public static boolean isValid ( int n , int m , int x , int y ) {
  if ( x >= 0 && x <= n - 1 && y >= 0 && y <= m - 1 ) {
    return true ;
  }
  return false ;
}

public static boolean isValid ( int n , int m , int x , int y ) { if ( x >= 0 && x <= n - 1 && y >= 0 && y <= m - 1 ) { return true ; } return false ; }
(method_declaration (modifiers) type: (boolean_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) right: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal))))) consequence: (block (return_statement (true)))) (return_statement (false))))