public static String solve ( int [ ] sides , int n ) {
  Arrays . sort ( sides ) ;
  boolean ans = true ;
  int y = sides [ 0 ] * sides [ sides . length - 1 ] ;
  int j = sides . length - 1 ;
  for ( int i = 0 ;
  i < sides . length / 2 ;
  i += 2 , j -= 2 ) {
    if ( sides [ i ] == sides [ i + 1 ] && ( sides [ j ] == sides [ ( j - 1 ) ] ) && sides [ i ] * sides [ j ] == y ) {
    }
    else {
      ans = false ;
      break ;
    }
  }
  if ( ans ) {
    return "YES" ;
  }
  else {
    return "NO" ;
  }
}

public static String solve ( int [ ] sides , int n ) { Arrays . sort ( sides ) ; boolean ans = true ; int y = sides [ 0 ] * sides [ sides . length - 1 ] ; int j = sides . length - 1 ; for ( int i = 0 ; i < sides . length / 2 ; i += 2 , j -= 2 ) { if ( sides [ i ] == sides [ i + 1 ] && ( sides [ j ] == sides [ ( j - 1 ) ] ) && sides [ i ] * sides [ j ] == y ) { } else { ans = false ; break ; } } if ( ans ) { return " YES " ; } else { return " NO " ; } }
(method_declaration (modifiers) type: (type_identifier) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (integral_type) dimensions: (dimensions)) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) (local_variable_declaration type: (boolean_type) declarator: (variable_declarator name: (identifier) value: (true))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (array_access array: (identifier) index: (decimal_integer_literal)) right: (array_access array: (identifier) index: (binary_expression left: (field_access object: (identifier) field: (identifier)) right: (decimal_integer_literal)))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (field_access object: (identifier) field: (identifier)) right: (decimal_integer_literal)))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (binary_expression left: (field_access object: (identifier) field: (identifier)) right: (decimal_integer_literal))) update: (assignment_expression left: (identifier) right: (decimal_integer_literal)) update: (assignment_expression left: (identifier) right: (decimal_integer_literal)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal)))) right: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (array_access array: (identifier) index: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))))))) right: (binary_expression left: (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (array_access array: (identifier) index: (identifier))) right: (identifier)))) consequence: (block) alternative: (block (expression_statement (assignment_expression left: (identifier) right: (false))) (break_statement))))) (if_statement condition: (parenthesized_expression (identifier)) consequence: (block (return_statement (string_literal))) alternative: (block (return_statement (string_literal))))))