public static String solve ( String s ) {
  if ( s . startsWith ( ")" ) || s . endsWith ( "(" ) ) return "No" ;
  if ( s . length ( ) % 2 == 1 ) return "No" ;
  return "Yes" ;
}

public static String solve ( String s ) { if ( s . startsWith ( " ) " ) || s . endsWith ( " ( " ) ) return " No " ; if ( s . length ( ) % 2 == 1 ) return " No " ; return " Yes " ; }
(method_declaration (modifiers) type: (type_identifier) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal))) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal))))) consequence: (return_statement (string_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) right: (decimal_integer_literal)) right: (decimal_integer_literal))) consequence: (return_statement (string_literal))) (return_statement (string_literal))))