public static void solve ( ) {
  long a = f . nl ( ) ;
  long b = f . nl ( ) ;
  boolean ok = true ;
  ok &= ( a - b ) == 1 && isPrime ( a + b ) ;
  pn ( ok ? "YES" : "NO" ) ;
}

public static void solve ( ) { long a = f . nl ( ) ; long b = f . nl ( ) ; boolean ok = true ; ok &= ( a - b ) == 1 && isPrime ( a + b ) ; pn ( ok ? " YES " : " NO " ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (boolean_type) declarator: (variable_declarator name: (identifier) value: (true))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (decimal_integer_literal)) right: (method_invocation name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (identifier))))))) (expression_statement (method_invocation name: (identifier) arguments: (argument_list (ternary_expression condition: (identifier) consequence: (string_literal) alternative: (string_literal)))))))