public static void main ( String [ ] srgs ) {
  Scanner scan = new Scanner ( System . in ) ;
  String a = scan . next ( ) ;
  boolean fig1 = false ;
  boolean fig2 = false ;
  boolean fig3 = false ;
  boolean fig4 = false ;
  for ( int i = 0 ;
  i != a . length ( ) ;
  i ++ ) {
    char ch = a . charAt ( i ) ;
    switch ( ch ) {
      case 'S' : fig1 = true ;
      break ;
      case 'E' : fig2 = true ;
      break ;
      case 'N' : fig3 = true ;
      break ;
      case 'W' : fig4 = true ;
      break ;
    }
  }
  boolean ans = false ;
  if ( fig3 && fig1 && fig2 == false && fig4 == false ) {
    ans = true ;
  }
  if ( fig3 == false && fig1 == false && fig2 && fig4 ) {
    ans = true ;
  }
  if ( fig1 && fig2 && fig3 && fig4 ) {
    ans = true ;
  }
  System . out . println ( ans ? "Yes" : "No" ) ;
  scan . close ( ) ;
}

public static void main ( String [ ] srgs ) { Scanner scan = new Scanner ( System . in ) ; String a = scan . next ( ) ; boolean fig1 = false ; boolean fig2 = false ; boolean fig3 = false ; boolean fig4 = false ; for ( int i = 0 ; i != a . length ( ) ; i ++ ) { char ch = a . charAt ( i ) ; switch ( ch ) { case ' S ' : fig1 = true ; break ; case ' E ' : fig2 = true ; break ; case ' N ' : fig3 = true ; break ; case ' W ' : fig4 = true ; break ; } } boolean ans = false ; if ( fig3 && fig1 && fig2 == false && fig4 == false ) { ans = true ; } if ( fig3 == false && fig1 == false && fig2 && fig4 ) { ans = true ; } if ( fig1 && fig2 && fig3 && fig4 ) { ans = true ; } System . out . println ( ans ? " Yes " : " No " ) ; scan . close ( ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) 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: (boolean_type) declarator: (variable_declarator name: (identifier) value: (false))) (local_variable_declaration type: (boolean_type) declarator: (variable_declarator name: (identifier) value: (false))) (local_variable_declaration type: (boolean_type) declarator: (variable_declarator name: (identifier) value: (false))) (local_variable_declaration type: (boolean_type) declarator: (variable_declarator name: (identifier) value: (false))) (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: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))) (switch_expression condition: (parenthesized_expression (identifier)) body: (switch_block (switch_block_statement_group (switch_label (character_literal)) (expression_statement (assignment_expression left: (identifier) right: (true))) (break_statement)) (switch_block_statement_group (switch_label (character_literal)) (expression_statement (assignment_expression left: (identifier) right: (true))) (break_statement)) (switch_block_statement_group (switch_label (character_literal)) (expression_statement (assignment_expression left: (identifier) right: (true))) (break_statement)) (switch_block_statement_group (switch_label (character_literal)) (expression_statement (assignment_expression left: (identifier) right: (true))) (break_statement)))))) (local_variable_declaration type: (boolean_type) declarator: (variable_declarator name: (identifier) value: (false))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (binary_expression left: (identifier) right: (false))) right: (binary_expression left: (identifier) right: (false)))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (true))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (false)) right: (binary_expression left: (identifier) right: (false))) right: (identifier)) right: (identifier))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (true))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (identifier)) right: (identifier))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (true))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (ternary_expression condition: (identifier) consequence: (string_literal) alternative: (string_literal))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))