public static void main ( String args [ ] ) {
  Scanner scan = new Scanner ( System . in ) ;
  String b1 = scan . next ( ) ;
  String b2 = scan . next ( ) ;
  int n = b1 . length ( ) ;
  int m = b2 . length ( ) ;
  if ( n != m ) System . out . print ( "NO" ) ;
  else {
    int b = 0 , e = n - 1 ;
    while ( b < n && e >= 0 ) {
      if ( b1 . charAt ( b ) != b2 . charAt ( e ) ) {
        System . out . println ( "NO" ) ;
        break ;
      }
      b ++ ;
      e -- ;
    }
    if ( b == n && e < 0 ) System . out . print ( "YES" ) ;
  }
}

public static void main ( String args [ ] ) { Scanner scan = new Scanner ( System . in ) ; String b1 = scan . next ( ) ; String b2 = scan . next ( ) ; int n = b1 . length ( ) ; int m = b2 . length ( ) ; if ( n != m ) System . out . print ( " NO " ) ; else { int b = 0 , e = n - 1 ; while ( b < n && e >= 0 ) { if ( b1 . charAt ( b ) != b2 . charAt ( e ) ) { System . out . println ( " NO " ) ; break ; } b ++ ; e -- ; } if ( b == n && e < 0 ) System . out . print ( " YES " ) ; } }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier) dimensions: (dimensions))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (type_identifier) 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: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal)))) alternative: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal)) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (decimal_integer_literal)))) (while_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal)))) (break_statement))) (expression_statement (update_expression (identifier))) (expression_statement (update_expression (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) consequence: (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal)))))))))