static String isFibonacci ( String s ) {
  HashMap < Character , Integer > m = new HashMap < > ( ) ;
  for ( int i = 0 ;
  i < s . length ( ) ;
  i ++ ) m . put ( s . charAt ( i ) , m . get ( s . charAt ( i ) ) == null ? 1 : m . get ( s . charAt ( i ) ) + 1 ) ;
  Vector < Integer > v = new Vector < > ( ) ;
  int n = m . size ( ) ;
  int a = 1 , b = 1 ;
  int c ;
  v . add ( a ) ;
  v . add ( b ) ;
  for ( int i = 0 ;
  i < n - 2 ;
  i ++ ) {
    v . add ( a + b ) ;
    c = a + b ;
    a = b ;
    b = c ;
  }
  int flag = 1 ;
  int i = 0 ;
  for ( HashMap . Entry < Character , Integer > entry : m . entrySet ( ) ) {
    if ( entry . getValue ( ) != v . elementAt ( i ) ) {
      flag = 1 ;
      break ;
    }
    i ++ ;
  }
  if ( flag == 1 ) return "YES" ;
  else return "NO" ;
}

static String isFibonacci ( String s ) { HashMap < Character , Integer > m = new HashMap < > ( ) ; for ( int i = 0 ; i < s . length ( ) ; i ++ ) m . put ( s . charAt ( i ) , m . get ( s . charAt ( i ) ) == null ? 1 : m . get ( s . charAt ( i ) ) + 1 ) ; Vector < Integer > v = new Vector < > ( ) ; int n = m . size ( ) ; int a = 1 , b = 1 ; int c ; v . add ( a ) ; v . add ( b ) ; for ( int i = 0 ; i < n - 2 ; i ++ ) { v . add ( a + b ) ; c = a + b ; a = b ; b = c ; } int flag = 1 ; int i = 0 ; for ( HashMap . Entry < Character , Integer > entry : m . entrySet ( ) ) { if ( entry . getValue ( ) != v . elementAt ( i ) ) { flag = 1 ; break ; } i ++ ; } if ( flag == 1 ) return " YES " ; else return " NO " ; }
(method_declaration (modifiers) type: (type_identifier) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier))) body: (block (local_variable_declaration type: (generic_type (type_identifier) (type_arguments (type_identifier) (type_identifier))) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (generic_type (type_identifier) (type_arguments)) arguments: (argument_list)))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) update: (update_expression (identifier)) body: (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) (ternary_expression condition: (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))) right: (null_literal)) consequence: (decimal_integer_literal) alternative: (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))) right: (decimal_integer_literal))))))) (local_variable_declaration type: (generic_type (type_identifier) (type_arguments (type_identifier))) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (generic_type (type_identifier) (type_arguments)) 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: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal)) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) (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: (identifier) right: (decimal_integer_literal))) update: (update_expression (identifier)) body: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (enhanced_for_statement type: (generic_type (scoped_type_identifier (type_identifier) (type_identifier)) (type_arguments (type_identifier) (type_identifier))) name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))) (break_statement))) (expression_statement (update_expression (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (return_statement (string_literal)) alternative: (return_statement (string_literal)))))