public static void main ( String [ ] $ ) {
  Scanner sc = new Scanner ( in ) ;
  int N = 0 , W = 0 , E = 0 , S = 0 ;
  String s = sc . next ( ) ;
  int n = s . length ( ) ;
  for ( int i = 0 ;
  i < n ;
  i ++ ) {
    switch ( s . charAt ( i ) ) {
      case 'N' : ++ N ;
      break ;
      case 'W' : ++ W ;
      break ;
      case 'S' : ++ S ;
      break ;
      case 'E' : ++ E ;
      break ;
      default : break ;
    }
  }
  String ans = "Yes" ;
  if ( ( N == 0 || S == 0 ) && ( N + S > 0 ) ) ans = "No" ;
  else if ( ( W == 0 || E == 0 ) && ( W + E > 0 ) ) ans = "No" ;
  out . println ( ans ) ;
}

public static void main ( String [ ] $ ) { Scanner sc = new Scanner ( in ) ; int N = 0 , W = 0 , E = 0 , S = 0 ; String s = sc . next ( ) ; int n = s . length ( ) ; for ( int i = 0 ; i < n ; i ++ ) { switch ( s . charAt ( i ) ) { case ' N ' : ++ N ; break ; case ' W ' : ++ W ; break ; case ' S ' : ++ S ; break ; case ' E ' : ++ E ; break ; default : break ; } } String ans = " Yes " ; if ( ( N == 0 || S == 0 ) && ( N + S > 0 ) ) ans = " No " ; else if ( ( W == 0 || E == 0 ) && ( W + E > 0 ) ) ans = " No " ; out . println ( ans ) ; }
(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 (identifier))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal)) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal)) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal)) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (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)))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (switch_expression condition: (parenthesized_expression (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) body: (switch_block (switch_block_statement_group (switch_label (character_literal)) (expression_statement (update_expression (identifier))) (break_statement)) (switch_block_statement_group (switch_label (character_literal)) (expression_statement (update_expression (identifier))) (break_statement)) (switch_block_statement_group (switch_label (character_literal)) (expression_statement (update_expression (identifier))) (break_statement)) (switch_block_statement_group (switch_label (character_literal)) (expression_statement (update_expression (identifier))) (break_statement)) (switch_block_statement_group (switch_label) (break_statement)))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (string_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) right: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))))) consequence: (expression_statement (assignment_expression left: (identifier) right: (string_literal))) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) right: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))))) consequence: (expression_statement (assignment_expression left: (identifier) right: (string_literal))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))))