public static void main ( String args [ ] ) throws Exception {
  Scanner sc = new Scanner ( System . in ) ;
  String S = sc . next ( ) ;
  Boolean a = true ;
  if ( S . contains ( "N" ) ) {
    if ( S . contains ( "S" ) ) {
    }
    else {
      a = false ;
    }
  }
  if ( S . contains ( "W" ) ) {
    if ( S . contains ( "E" ) ) {
    }
    else {
      a = false ;
    }
  }
  if ( S . contains ( "S" ) ) {
    if ( S . contains ( "N" ) ) {
    }
    else {
      a = false ;
    }
  }
  if ( S . contains ( "E" ) ) {
    if ( S . contains ( "W" ) ) {
    }
    else {
      a = false ;
    }
  }
  if ( a ) {
    System . out . println ( "Yes" ) ;
  }
  else {
    System . out . println ( "No" ) ;
  }
}

public static void main ( String args [ ] ) throws Exception { Scanner sc = new Scanner ( System . in ) ; String S = sc . next ( ) ; Boolean a = true ; if ( S . contains ( " N " ) ) { if ( S . contains ( " S " ) ) { } else { a = false ; } } if ( S . contains ( " W " ) ) { if ( S . contains ( " E " ) ) { } else { a = false ; } } if ( S . contains ( " S " ) ) { if ( S . contains ( " N " ) ) { } else { a = false ; } } if ( S . contains ( " E " ) ) { if ( S . contains ( " W " ) ) { } else { a = false ; } } if ( a ) { System . out . println ( " Yes " ) ; } else { System . out . println ( " No " ) ; } }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier) dimensions: (dimensions))) (throws (type_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: (type_identifier) declarator: (variable_declarator name: (identifier) value: (true))) (if_statement condition: (parenthesized_expression (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal)))) consequence: (block (if_statement condition: (parenthesized_expression (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal)))) consequence: (block) alternative: (block (expression_statement (assignment_expression left: (identifier) right: (false))))))) (if_statement condition: (parenthesized_expression (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal)))) consequence: (block (if_statement condition: (parenthesized_expression (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal)))) consequence: (block) alternative: (block (expression_statement (assignment_expression left: (identifier) right: (false))))))) (if_statement condition: (parenthesized_expression (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal)))) consequence: (block (if_statement condition: (parenthesized_expression (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal)))) consequence: (block) alternative: (block (expression_statement (assignment_expression left: (identifier) right: (false))))))) (if_statement condition: (parenthesized_expression (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal)))) consequence: (block (if_statement condition: (parenthesized_expression (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (string_literal)))) consequence: (block) alternative: (block (expression_statement (assignment_expression left: (identifier) right: (false))))))) (if_statement condition: (parenthesized_expression (identifier)) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal))))) alternative: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal))))))))