node_ids
sequencelengths
4
1.4k
edge_index
sequencelengths
1
2.22k
text
sequencelengths
4
1.4k
source
stringlengths
14
427k
[ 7, 0, 13, 4, 13, 4, 13, 14, 40, 2, 4, 13, 13, 17, 17, 4, 13, 17, 14, 2, 2, 2, 2, 2, 17, 13, 40, 2, 17, 13, 2, 2, 17, 13, 40, 2, 17, 13, 2, 2, 17, 13, 40, 2, 17, 13, 2, 2, 17, 13, 40, 2, 17, 13, 4, 13, 17, 4, 13, 17, 10, 4, 13 ]
[ [ 61, 2 ], [ 62, 12 ], [ 62, 25 ], [ 62, 29 ], [ 62, 33 ], [ 62, 37 ], [ 62, 41 ], [ 62, 45 ], [ 62, 49 ], [ 62, 53 ], [ 61, 62 ] ]
[ "#!/usr/bin/env python3\n\nS = set(input())\n\nif len(S) % 2 != 0:\n print(\"No\")\nelif (\"N\" in S and not \"S\" in S) or (\"S\" in S and not \"N\" in S) or (\"W\" in S and not \"E\" in S) or (\"E\" in S and not \"W\" in S):\n print(\"No\")\nelse:\n print(\"Yes\")\n\n\n\n\n", "S = set(input())", "S", "set(input())", "set", "input()", "input", "if len(S) % 2 != 0:\n print(\"No\")\nelif (\"N\" in S and not \"S\" in S) or (\"S\" in S and not \"N\" in S) or (\"W\" in S and not \"E\" in S) or (\"E\" in S and not \"W\" in S):\n print(\"No\")\nelse:\n print(\"Yes\")", "len(S) % 2 != 0", "len(S) % 2", "len(S)", "len", "S", "2", "0", "print(\"No\")", "print", "\"No\"", "elif (\"N\" in S and not \"S\" in S) or (\"S\" in S and not \"N\" in S) or (\"W\" in S and not \"E\" in S) or (\"E\" in S and not \"W\" in S):\n print(\"No\")", "(\"N\" in S and not \"S\" in S) or (\"S\" in S and not \"N\" in S) or (\"W\" in S and not \"E\" in S) or (\"E\" in S and not \"W\" in S)", "(\"N\" in S and not \"S\" in S) or (\"S\" in S and not \"N\" in S) or (\"W\" in S and not \"E\" in S)", "(\"N\" in S and not \"S\" in S) or (\"S\" in S and not \"N\" in S)", "\"N\" in S and not \"S\" in S", "\"N\" in S", "\"N\"", "S", "not \"S\" in S", "\"S\" in S", "\"S\"", "S", "\"S\" in S and not \"N\" in S", "\"S\" in S", "\"S\"", "S", "not \"N\" in S", "\"N\" in S", "\"N\"", "S", "\"W\" in S and not \"E\" in S", "\"W\" in S", "\"W\"", "S", "not \"E\" in S", "\"E\" in S", "\"E\"", "S", "\"E\" in S and not \"W\" in S", "\"E\" in S", "\"E\"", "S", "not \"W\" in S", "\"W\" in S", "\"W\"", "S", "print(\"No\")", "print", "\"No\"", "print(\"Yes\")", "print", "\"Yes\"", "S = set(input())", "set(input())", "S" ]
#!/usr/bin/env python3 S = set(input()) if len(S) % 2 != 0: print("No") elif ("N" in S and not "S" in S) or ("S" in S and not "N" in S) or ("W" in S and not "E" in S) or ("E" in S and not "W" in S): print("No") else: print("Yes")
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 8, 2, 17, 13, 4, 18, 13, 13, 17, 17, 0, 13, 8, 2, 17, 13, 4, 18, 13, 13, 17, 17, 0, 13, 8, 2, 17, 13, 4, 18, 13, 13, 17, 17, 0, 13, 8, 2, 17, 13, 4, 18, 13, 13, 17, 17, 14, 2, 2, 2, 2, 40, 13, 17, 2, 13, 17, 2, 2, 13, 17, 40, 13, 17, 2, 40, 13, 17, 2, 13, 17, 2, 2, 13, 17, 40, 13, 17, 4, 13, 17, 4, 13, 17, 10, 8, 13, 10, 8, 13, 10, 4, 13, 10, 4, 13, 10, 8, 13, 10, 8, 13 ]
[ [ 103, 2 ], [ 106, 6 ], [ 104, 9 ], [ 109, 11 ], [ 107, 15 ], [ 104, 15 ], [ 107, 18 ], [ 104, 18 ], [ 97, 23 ], [ 107, 27 ], [ 104, 27 ], [ 107, 30 ], [ 104, 30 ], [ 100, 35 ], [ 107, 39 ], [ 104, 39 ], [ 107, 42 ], [ 104, 42 ], [ 112, 47 ], [ 107, 51 ], [ 104, 51 ], [ 107, 54 ], [ 104, 54 ], [ 110, 64 ], [ 101, 67 ], [ 110, 71 ], [ 101, 74 ], [ 113, 78 ], [ 98, 81 ], [ 113, 85 ], [ 98, 88 ], [ 97, 98 ], [ 100, 101 ], [ 103, 104 ], [ 106, 107 ], [ 109, 110 ], [ 112, 113 ] ]
[ "s = input()\n\ns = list(s)\nsowth = s.count('S') if 'S' in s else 0\neast = s.count('E') if 'E' in s else 0\nnorth = s.count('N') if 'N' in s else 0\nwest = s.count('W') if 'W' in s else 0\n\nif (sowth != 0 and north == 0) or\\\n (sowth == 0 and north != 0) or\\\n (west != 0 and east == 0) or\\\n (west == 0 and east != 0):\n print('No')\nelse:\n print('Yes')", "s = input()", "s", "input()", "input", "s = list(s)", "s", "list(s)", "list", "s", "sowth = s.count('S') if 'S' in s else 0", "sowth", "s.count('S') if 'S' in s else 0", "'S' in s", "'S'", "s", "s.count('S')", "s.count", "s", "count", "'S'", "0", "east = s.count('E') if 'E' in s else 0", "east", "s.count('E') if 'E' in s else 0", "'E' in s", "'E'", "s", "s.count('E')", "s.count", "s", "count", "'E'", "0", "north = s.count('N') if 'N' in s else 0", "north", "s.count('N') if 'N' in s else 0", "'N' in s", "'N'", "s", "s.count('N')", "s.count", "s", "count", "'N'", "0", "west = s.count('W') if 'W' in s else 0", "west", "s.count('W') if 'W' in s else 0", "'W' in s", "'W'", "s", "s.count('W')", "s.count", "s", "count", "'W'", "0", "if (sowth != 0 and north == 0) or\\\n (sowth == 0 and north != 0) or\\\n (west != 0 and east == 0) or\\\n (west == 0 and east != 0):\n print('No')\nelse:\n print('Yes')", "(sowth != 0 and north == 0) or\\\n (sowth == 0 and north != 0) or\\\n (west != 0 and east == 0) or\\\n (west == 0 and east != 0)", "(sowth != 0 and north == 0) or\\\n (sowth == 0 and north != 0) or\\\n (west != 0 and east == 0)", "(sowth != 0 and north == 0) or\\\n (sowth == 0 and north != 0)", "sowth != 0 and north == 0", "sowth != 0", "sowth", "0", "north == 0", "north", "0", "sowth == 0 and north != 0", "sowth == 0", "sowth", "0", "north != 0", "north", "0", "west != 0 and east == 0", "west != 0", "west", "0", "east == 0", "east", "0", "west == 0 and east != 0", "west == 0", "west", "0", "east != 0", "east", "0", "print('No')", "print", "'No'", "print('Yes')", "print", "'Yes'", "east = s.count('E') if 'E' in s else 0", "s.count('E') if 'E' in s else 0", "east", "north = s.count('N') if 'N' in s else 0", "s.count('N') if 'N' in s else 0", "north", "s = input()", "input()", "s", "s = list(s)", "list(s)", "s", "sowth = s.count('S') if 'S' in s else 0", "s.count('S') if 'S' in s else 0", "sowth", "west = s.count('W') if 'W' in s else 0", "s.count('W') if 'W' in s else 0", "west" ]
s = input() s = list(s) sowth = s.count('S') if 'S' in s else 0 east = s.count('E') if 'E' in s else 0 north = s.count('N') if 'N' in s else 0 west = s.count('W') if 'W' in s else 0 if (sowth != 0 and north == 0) or\ (sowth == 0 and north != 0) or\ (west != 0 and east == 0) or\ (west == 0 and east != 0): print('No') else: print('Yes')
[ 7, 0, 13, 4, 13, 4, 13, 4, 13, 4, 13, 0, 13, 17, 15, 13, 0, 13, 4, 18, 13, 13, 13, 14, 2, 2, 2, 18, 13, 17, 18, 13, 17, 17, 2, 2, 18, 13, 17, 18, 13, 17, 17, 0, 13, 17, 4, 13, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 50, 2 ], [ 59, 12 ], [ 53, 17 ], [ 51, 22 ], [ 54, 28 ], [ 54, 31 ], [ 54, 37 ], [ 54, 40 ], [ 56, 44 ], [ 57, 48 ], [ 60, 48 ], [ 50, 51 ], [ 53, 54 ], [ 56, 57 ], [ 59, 60 ] ]
[ "s = list(set(list(input())))\nans = \"Yes\"\n\nimport collections\nc = collections.Counter(s)\n\nif c[\"N\"] + c[\"S\"] == 1 or c[\"W\"] + c[\"E\"] == 1:\n ans = \"No\"\n \nprint(ans)", "s = list(set(list(input())))", "s", "list(set(list(input())))", "list", "set(list(input()))", "set", "list(input())", "list", "input()", "input", "ans = \"Yes\"", "ans", "\"Yes\"", "import collections", "collections", "c = collections.Counter(s)", "c", "collections.Counter(s)", "collections.Counter", "collections", "Counter", "s", "if c[\"N\"] + c[\"S\"] == 1 or c[\"W\"] + c[\"E\"] == 1:\n ans = \"No\"\n ", "c[\"N\"] + c[\"S\"] == 1 or c[\"W\"] + c[\"E\"] == 1", "c[\"N\"] + c[\"S\"] == 1", "c[\"N\"] + c[\"S\"]", "c[\"N\"]", "c", "\"N\"", "c[\"S\"]", "c", "\"S\"", "1", "c[\"W\"] + c[\"E\"] == 1", "c[\"W\"] + c[\"E\"]", "c[\"W\"]", "c", "\"W\"", "c[\"E\"]", "c", "\"E\"", "1", "ans = \"No\"", "ans", "\"No\"", "print(ans)", "print", "ans", "s = list(set(list(input())))", "list(set(list(input())))", "s", "c = collections.Counter(s)", "collections.Counter(s)", "c", "ans = \"No\"", "\"No\"", "ans", "ans = \"Yes\"", "\"Yes\"", "ans" ]
s = list(set(list(input()))) ans = "Yes" import collections c = collections.Counter(s) if c["N"] + c["S"] == 1 or c["W"] + c["E"] == 1: ans = "No" print(ans)
[ 7, 0, 13, 4, 13, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 14, 2, 2, 2, 2, 2, 13, 17, 2, 13, 17, 2, 2, 13, 17, 2, 13, 17, 2, 2, 13, 17, 2, 13, 17, 2, 2, 13, 17, 2, 13, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 78, 2 ], [ 84, 6 ], [ 79, 9 ], [ 81, 13 ], [ 79, 16 ], [ 72, 20 ], [ 79, 23 ], [ 75, 27 ], [ 79, 30 ], [ 85, 39 ], [ 82, 42 ], [ 85, 46 ], [ 82, 49 ], [ 76, 53 ], [ 73, 56 ], [ 73, 60 ], [ 76, 63 ], [ 72, 73 ], [ 75, 76 ], [ 78, 79 ], [ 81, 82 ], [ 84, 85 ] ]
[ "st = input() \nn = st.count('N') \ns = st.count('S') \ne = st.count('E') \nw = st.count('W') \n\nif (n>0 and s==0) or (n==0 and s>0) or (w==0 and e>0) or (e==0 and w>0): \n print(\"No\") \nelse:\n print(\"Yes\") ", "st = input()", "st", "input()", "input", "n = st.count('N')", "n", "st.count('N')", "st.count", "st", "count", "'N'", "s = st.count('S')", "s", "st.count('S')", "st.count", "st", "count", "'S'", "e = st.count('E')", "e", "st.count('E')", "st.count", "st", "count", "'E'", "w = st.count('W')", "w", "st.count('W')", "st.count", "st", "count", "'W'", "if (n>0 and s==0) or (n==0 and s>0) or (w==0 and e>0) or (e==0 and w>0): \n print(\"No\") \nelse:\n print(\"Yes\") ", "(n>0 and s==0) or (n==0 and s>0) or (w==0 and e>0) or (e==0 and w>0)", "(n>0 and s==0) or (n==0 and s>0) or (w==0 and e>0)", "(n>0 and s==0) or (n==0 and s>0)", "n>0 and s==0", "n>0", "n", "0", "s==0", "s", "0", "n==0 and s>0", "n==0", "n", "0", "s>0", "s", "0", "w==0 and e>0", "w==0", "w", "0", "e>0", "e", "0", "e==0 and w>0", "e==0", "e", "0", "w>0", "w", "0", "print(\"No\")", "print", "\"No\"", "print(\"Yes\")", "print", "\"Yes\"", "e = st.count('E')", "st.count('E')", "e", "w = st.count('W')", "st.count('W')", "w", "st = input()", "input()", "st", "s = st.count('S')", "st.count('S')", "s", "n = st.count('N')", "st.count('N')", "n" ]
st = input() n = st.count('N') s = st.count('S') e = st.count('E') w = st.count('W') if (n>0 and s==0) or (n==0 and s>0) or (w==0 and e>0) or (e==0 and w>0): print("No") else: print("Yes")
[ 7, 0, 13, 4, 13, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 14, 2, 2, 2, 2, 2, 40, 13, 17, 40, 13, 17, 2, 13, 17, 2, 13, 17, 2, 2, 2, 40, 13, 17, 40, 13, 17, 2, 13, 17, 2, 13, 17, 2, 2, 2, 40, 13, 17, 40, 13, 17, 40, 13, 17, 40, 13, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 88, 2 ], [ 100, 6 ], [ 89, 9 ], [ 91, 13 ], [ 89, 16 ], [ 94, 20 ], [ 89, 23 ], [ 97, 27 ], [ 89, 30 ], [ 101, 40 ], [ 95, 43 ], [ 92, 46 ], [ 98, 49 ], [ 92, 55 ], [ 98, 58 ], [ 101, 61 ], [ 95, 64 ], [ 101, 70 ], [ 95, 73 ], [ 92, 76 ], [ 98, 79 ], [ 88, 89 ], [ 91, 92 ], [ 94, 95 ], [ 97, 98 ], [ 100, 101 ] ]
[ "t=input()\nn=t.count(\"N\")\nw=t.count(\"W\")\ns=t.count(\"S\")\ne=t.count(\"E\")\nif ((n>=1 and s>=1 and w==0 and e==0) or (w>=1 and e>=1 and n==0 and s==0) or (n>=1 and s>=1 and w>=1 and e>=1)):\n print(\"Yes\")\nelse:\n print(\"No\")", "t=input()", "t", "input()", "input", "n=t.count(\"N\")", "n", "t.count(\"N\")", "t.count", "t", "count", "\"N\"", "w=t.count(\"W\")", "w", "t.count(\"W\")", "t.count", "t", "count", "\"W\"", "s=t.count(\"S\")", "s", "t.count(\"S\")", "t.count", "t", "count", "\"S\"", "e=t.count(\"E\")", "e", "t.count(\"E\")", "t.count", "t", "count", "\"E\"", "if ((n>=1 and s>=1 and w==0 and e==0) or (w>=1 and e>=1 and n==0 and s==0) or (n>=1 and s>=1 and w>=1 and e>=1)):\n print(\"Yes\")\nelse:\n print(\"No\")", "(n>=1 and s>=1 and w==0 and e==0) or (w>=1 and e>=1 and n==0 and s==0) or (n>=1 and s>=1 and w>=1 and e>=1)", "(n>=1 and s>=1 and w==0 and e==0) or (w>=1 and e>=1 and n==0 and s==0)", "n>=1 and s>=1 and w==0 and e==0", "n>=1 and s>=1 and w==0", "n>=1 and s>=1", "n>=1", "n", "1", "s>=1", "s", "1", "w==0", "w", "0", "e==0", "e", "0", "w>=1 and e>=1 and n==0 and s==0", "w>=1 and e>=1 and n==0", "w>=1 and e>=1", "w>=1", "w", "1", "e>=1", "e", "1", "n==0", "n", "0", "s==0", "s", "0", "n>=1 and s>=1 and w>=1 and e>=1", "n>=1 and s>=1 and w>=1", "n>=1 and s>=1", "n>=1", "n", "1", "s>=1", "s", "1", "w>=1", "w", "1", "e>=1", "e", "1", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "t=input()", "input()", "t", "w=t.count(\"W\")", "t.count(\"W\")", "w", "s=t.count(\"S\")", "t.count(\"S\")", "s", "e=t.count(\"E\")", "t.count(\"E\")", "e", "n=t.count(\"N\")", "t.count(\"N\")", "n" ]
t=input() n=t.count("N") w=t.count("W") s=t.count("S") e=t.count("E") if ((n>=1 and s>=1 and w==0 and e==0) or (w>=1 and e>=1 and n==0 and s==0) or (n>=1 and s>=1 and w>=1 and e>=1)): print("Yes") else: print("No")
[ 7, 0, 13, 4, 13, 14, 2, 2, 2, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 2, 2, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13 ]
[ [ 44, 2 ], [ 45, 11 ], [ 45, 18 ], [ 45, 26 ], [ 45, 33 ], [ 44, 45 ] ]
[ "s = input()\nif (s.count('N')>0)^(s.count('S')>0) or (s.count('E')>0)^(s.count('W')>0):\n print('No')\nelse:\n print('Yes')", "s = input()", "s", "input()", "input", "if (s.count('N')>0)^(s.count('S')>0) or (s.count('E')>0)^(s.count('W')>0):\n print('No')\nelse:\n print('Yes')", "(s.count('N')>0)^(s.count('S')>0) or (s.count('E')>0)^(s.count('W')>0)", "(s.count('N')>0)^(s.count('S')>0)", "s.count('N')>0", "s.count('N')", "s.count", "s", "count", "'N'", "0", "s.count('S')>0", "s.count('S')", "s.count", "s", "count", "'S'", "0", "(s.count('E')>0)^(s.count('W')>0)", "s.count('E')>0", "s.count('E')", "s.count", "s", "count", "'E'", "0", "s.count('W')>0", "s.count('W')", "s.count", "s", "count", "'W'", "0", "print('No')", "print", "'No'", "print('Yes')", "print", "'Yes'", "s = input()", "input()", "s" ]
s = input() if (s.count('N')>0)^(s.count('S')>0) or (s.count('E')>0)^(s.count('W')>0): print('No') else: print('Yes')
[ 7, 0, 13, 4, 13, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 14, 2, 40, 2, 13, 13, 17, 2, 2, 13, 13, 17, 4, 13, 17, 4, 13, 14, 2, 40, 2, 13, 13, 17, 2, 2, 13, 13, 17, 4, 13, 17, 4, 13, 4, 13, 17, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 80, 2 ], [ 71, 6 ], [ 81, 9 ], [ 74, 13 ], [ 81, 16 ], [ 77, 20 ], [ 81, 23 ], [ 83, 27 ], [ 81, 30 ], [ 72, 37 ], [ 75, 38 ], [ 72, 42 ], [ 75, 43 ], [ 78, 54 ], [ 84, 55 ], [ 78, 59 ], [ 84, 60 ], [ 71, 72 ], [ 74, 75 ], [ 77, 78 ], [ 80, 81 ], [ 83, 84 ] ]
[ "s = input()\nkita = s.count(\"N\")\nmina = s.count(\"S\")\nnisi = s.count(\"W\")\nhiga = s.count(\"E\")\n\nif kita + mina != 0 and kita*mina == 0:\n print(\"No\")\n exit()\nif nisi + higa != 0 and nisi*higa == 0:\n print(\"No\")\n exit()\n\nprint(\"Yes\")", "s = input()", "s", "input()", "input", "kita = s.count(\"N\")", "kita", "s.count(\"N\")", "s.count", "s", "count", "\"N\"", "mina = s.count(\"S\")", "mina", "s.count(\"S\")", "s.count", "s", "count", "\"S\"", "nisi = s.count(\"W\")", "nisi", "s.count(\"W\")", "s.count", "s", "count", "\"W\"", "higa = s.count(\"E\")", "higa", "s.count(\"E\")", "s.count", "s", "count", "\"E\"", "if kita + mina != 0 and kita*mina == 0:\n print(\"No\")\n exit()", "kita + mina != 0 and kita*mina == 0", "kita + mina != 0", "kita + mina", "kita", "mina", "0", "kita*mina == 0", "kita*mina", "kita", "mina", "0", "print(\"No\")", "print", "\"No\"", "exit()", "exit", "if nisi + higa != 0 and nisi*higa == 0:\n print(\"No\")\n exit()", "nisi + higa != 0 and nisi*higa == 0", "nisi + higa != 0", "nisi + higa", "nisi", "higa", "0", "nisi*higa == 0", "nisi*higa", "nisi", "higa", "0", "print(\"No\")", "print", "\"No\"", "exit()", "exit", "print(\"Yes\")", "print", "\"Yes\"", "kita = s.count(\"N\")", "s.count(\"N\")", "kita", "mina = s.count(\"S\")", "s.count(\"S\")", "mina", "nisi = s.count(\"W\")", "s.count(\"W\")", "nisi", "s = input()", "input()", "s", "higa = s.count(\"E\")", "s.count(\"E\")", "higa" ]
s = input() kita = s.count("N") mina = s.count("S") nisi = s.count("W") higa = s.count("E") if kita + mina != 0 and kita*mina == 0: print("No") exit() if nisi + higa != 0 and nisi*higa == 0: print("No") exit() print("Yes")
[ 7, 15, 13, 0, 13, 18, 18, 13, 13, 13, 0, 13, 17, 0, 13, 18, 4, 13, 39, 17, 0, 13, 39, 17, 17, 17, 17, 28, 13, 4, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 0, 18, 13, 17, 17, 14, 2, 18, 13, 13, 17, 0, 18, 13, 17, 17, 14, 2, 18, 13, 13, 17, 0, 18, 13, 17, 17, 14, 2, 18, 13, 13, 17, 0, 18, 13, 17, 17, 14, 2, 4, 18, 13, 13, 17, 17, 4, 13, 17, 4, 13, 14, 2, 2, 4, 18, 18, 13, 39, 17, 13, 17, 17, 2, 4, 18, 18, 13, 39, 17, 13, 17, 17, 4, 13, 17, 4, 13, 14, 2, 2, 4, 18, 18, 13, 39, 17, 13, 17, 17, 2, 4, 18, 18, 13, 39, 17, 13, 17, 17, 4, 13, 17, 4, 13, 4, 13, 17, 10, 39, 13, 10, 18, 13, 10, 17, 13, 10, 18, 13 ]
[ [ 152, 4 ], [ 155, 11 ], [ 158, 14 ], [ 153, 17 ], [ 149, 21 ], [ 29, 28 ], [ 159, 33 ], [ 159, 37 ], [ 28, 38 ], [ 44, 41 ], [ 150, 42 ], [ 159, 48 ], [ 28, 49 ], [ 55, 52 ], [ 150, 53 ], [ 159, 59 ], [ 28, 60 ], [ 66, 63 ], [ 150, 64 ], [ 159, 70 ], [ 28, 71 ], [ 77, 74 ], [ 150, 75 ], [ 150, 82 ], [ 150, 97 ], [ 150, 107 ], [ 150, 124 ], [ 150, 134 ], [ 149, 150 ], [ 152, 153 ], [ 155, 156 ], [ 158, 159 ] ]
[ "import sys\n\ninput = sys.stdin.readline\nMOD = 1000000007\n\nS = input()[:-1]\n\nx = [0,0,0,0]\n\nfor i in range(len(S)):\n if S[i] == 'N':\n x[0]+=1\n if S[i] == 'S':\n x[1]+=1\n if S[i] == 'E':\n x[2]+=1\n if S[i] == 'W':\n x[3]+=1\n\n\nif x.count(0) == 0:\n print(\"Yes\")\n exit()\nelse:\n if x[:2].count(0) == 0 and x[2:].count(0) == 2:\n print(\"Yes\")\n exit()\n if x[:2].count(0) == 2 and x[2:].count(0) == 0:\n print(\"Yes\")\n exit()\n \nprint(\"No\")", "import sys", "sys", "input = sys.stdin.readline", "input", "sys.stdin.readline", "sys.stdin", "sys", "stdin", "readline", "MOD = 1000000007", "MOD", "1000000007", "S = input()[:-1]", "S", "input()[:-1]", "()", "input", ":-1", "-1", "x = [0,0,0,0]", "x", "[0,0,0,0]", "0", "0", "0", "0", "for i in range(len(S)):\n if S[i] == 'N':\n x[0]+=1\n if S[i] == 'S':\n x[1]+=1\n if S[i] == 'E':\n x[2]+=1\n if S[i] == 'W':\n x[3]+=1", "i", "range(len(S))", "range", "len(S)", "len", "S", "if S[i] == 'N':\n x[0]+=1\n ", "S[i] == 'N'", "S[i]", "S", "i", "'N'", "x[0]+=1", "x[0]", "x", "0", "1", "if S[i] == 'S':\n x[1]+=1\n ", "S[i] == 'S'", "S[i]", "S", "i", "'S'", "x[1]+=1", "x[1]", "x", "1", "1", "if S[i] == 'E':\n x[2]+=1\n ", "S[i] == 'E'", "S[i]", "S", "i", "'E'", "x[2]+=1", "x[2]", "x", "2", "1", "if S[i] == 'W':\n x[3]+=1", "S[i] == 'W'", "S[i]", "S", "i", "'W'", "x[3]+=1", "x[3]", "x", "3", "1", "if x.count(0) == 0:\n print(\"Yes\")\n exit()\nelse:\n if x[:2].count(0) == 0 and x[2:].count(0) == 2:\n print(\"Yes\")\n exit()\n if x[:2].count(0) == 2 and x[2:].count(0) == 0:\n print(\"Yes\")\n exit()\n ", "x.count(0) == 0", "x.count(0)", "x.count", "x", "count", "0", "0", "print(\"Yes\")", "print", "\"Yes\"", "exit()", "exit", "if x[:2].count(0) == 0 and x[2:].count(0) == 2:\n print(\"Yes\")\n exit()\n ", "x[:2].count(0) == 0 and x[2:].count(0) == 2", "x[:2].count(0) == 0", "x[:2].count(0)", "[:2].count", "[:2]", "x", ":2", "2", "count", "0", "0", "x[2:].count(0) == 2", "x[2:].count(0)", "[2:].count", "[2:]", "x", "2:", "2", "count", "0", "2", "print(\"Yes\")", "print", "\"Yes\"", "exit()", "exit", "if x[:2].count(0) == 2 and x[2:].count(0) == 0:\n print(\"Yes\")\n exit()\n ", "x[:2].count(0) == 2 and x[2:].count(0) == 0", "x[:2].count(0) == 2", "x[:2].count(0)", "[:2].count", "[:2]", "x", ":2", "2", "count", "0", "2", "x[2:].count(0) == 0", "x[2:].count(0)", "[2:].count", "[2:]", "x", "2:", "2", "count", "0", "0", "print(\"Yes\")", "print", "\"Yes\"", "exit()", "exit", "print(\"No\")", "print", "\"No\"", "x = [0,0,0,0]", "[0,0,0,0]", "x", "input = sys.stdin.readline", "sys.stdin.readline", "input", "MOD = 1000000007", "1000000007", "MOD", "S = input()[:-1]", "input()[:-1]", "S" ]
import sys input = sys.stdin.readline MOD = 1000000007 S = input()[:-1] x = [0,0,0,0] for i in range(len(S)): if S[i] == 'N': x[0]+=1 if S[i] == 'S': x[1]+=1 if S[i] == 'E': x[2]+=1 if S[i] == 'W': x[3]+=1 if x.count(0) == 0: print("Yes") exit() else: if x[:2].count(0) == 0 and x[2:].count(0) == 2: print("Yes") exit() if x[:2].count(0) == 2 and x[2:].count(0) == 0: print("Yes") exit() print("No")
[ 7, 0, 13, 4, 13, 14, 2, 2, 2, 2, 17, 13, 2, 17, 13, 2, 17, 13, 2, 17, 13, 4, 13, 17, 14, 2, 2, 2, 2, 17, 13, 2, 17, 13, 40, 2, 17, 13, 40, 2, 17, 13, 4, 13, 17, 14, 2, 2, 2, 40, 2, 17, 13, 40, 2, 17, 13, 2, 17, 13, 2, 17, 13, 4, 13, 17, 4, 13, 17, 10, 4, 13 ]
[ [ 70, 2 ], [ 71, 11 ], [ 71, 14 ], [ 71, 17 ], [ 71, 20 ], [ 71, 30 ], [ 71, 33 ], [ 71, 37 ], [ 71, 41 ], [ 71, 52 ], [ 71, 56 ], [ 71, 59 ], [ 71, 62 ], [ 70, 71 ] ]
[ "s = input()\nif 'W' in s and 'E' in s and 'N' in s and 'S' in s:\n print('Yes')\nelif 'W' in s and 'E' in s and not 'N' in s and not 'S' in s:\n print('Yes')\nelif not 'W' in s and not 'E' in s and 'N' in s and 'S' in s:\n print('Yes')\nelse:\n print('No')", "s = input()", "s", "input()", "input", "if 'W' in s and 'E' in s and 'N' in s and 'S' in s:\n print('Yes')\nelif 'W' in s and 'E' in s and not 'N' in s and not 'S' in s:\n print('Yes')\nelif not 'W' in s and not 'E' in s and 'N' in s and 'S' in s:\n print('Yes')\nelse:\n print('No')", "'W' in s and 'E' in s and 'N' in s and 'S' in s", "'W' in s and 'E' in s and 'N' in s", "'W' in s and 'E' in s", "'W' in s", "'W'", "s", "'E' in s", "'E'", "s", "'N' in s", "'N'", "s", "'S' in s", "'S'", "s", "print('Yes')", "print", "'Yes'", "elif 'W' in s and 'E' in s and not 'N' in s and not 'S' in s:\n print('Yes')", "'W' in s and 'E' in s and not 'N' in s and not 'S' in s", "'W' in s and 'E' in s and not 'N' in s", "'W' in s and 'E' in s", "'W' in s", "'W'", "s", "'E' in s", "'E'", "s", "not 'N' in s", "'N' in s", "'N'", "s", "not 'S' in s", "'S' in s", "'S'", "s", "print('Yes')", "print", "'Yes'", "elif not 'W' in s and not 'E' in s and 'N' in s and 'S' in s:\n print('Yes')", "not 'W' in s and not 'E' in s and 'N' in s and 'S' in s", "not 'W' in s and not 'E' in s and 'N' in s", "not 'W' in s and not 'E' in s", "not 'W' in s", "'W' in s", "'W'", "s", "not 'E' in s", "'E' in s", "'E'", "s", "'N' in s", "'N'", "s", "'S' in s", "'S'", "s", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "s = input()", "input()", "s" ]
s = input() if 'W' in s and 'E' in s and 'N' in s and 'S' in s: print('Yes') elif 'W' in s and 'E' in s and not 'N' in s and not 'S' in s: print('Yes') elif not 'W' in s and not 'E' in s and 'N' in s and 'S' in s: print('Yes') else: print('No')
[ 7, 12, 13, 15, 13, 0, 13, 18, 18, 13, 13, 13, 4, 18, 13, 13, 2, 17, 17, 15, 15, 15, 15, 15, 13, 0, 13, 4, 18, 4, 13, 13, 14, 2, 2, 2, 17, 13, 2, 17, 13, 2, 40, 17, 13, 40, 17, 13, 14, 2, 2, 2, 17, 13, 2, 17, 13, 2, 40, 17, 13, 40, 17, 13, 4, 13, 17, 4, 13, 4, 13, 17, 14, 2, 13, 17, 4, 13, 10, 12, 13 ]
[ [ 7, 6 ], [ 27, 26 ], [ 6, 30 ], [ 26, 37 ], [ 26, 40 ], [ 26, 44 ], [ 26, 47 ], [ 26, 53 ], [ 26, 56 ], [ 26, 60 ], [ 26, 63 ], [ 80, 77 ] ]
[ "def main():\n import sys\n input = sys.stdin.readline\n sys.setrecursionlimit(10**7)\n from collections import Counter, deque\n from itertools import combinations, permutations, accumulate, groupby, product\n from bisect import bisect_left,bisect_right\n from heapq import heapify, heappop, heappush\n import math\n #from math import gcd\n\n #inf = 10**17\n #mod = 10**9 + 7\n\n s = input().rstrip()\n if ('N' in s and 'S' in s) or ('N' not in s and 'S' not in s):\n if ('W' in s and 'E' in s) or ('W' not in s and 'E' not in s):\n print('Yes')\n exit()\n print('No')\n\nif __name__ == '__main__':\n main()", "def main():\n import sys\n input = sys.stdin.readline\n sys.setrecursionlimit(10**7)\n from collections import Counter, deque\n from itertools import combinations, permutations, accumulate, groupby, product\n from bisect import bisect_left,bisect_right\n from heapq import heapify, heappop, heappush\n import math\n #from math import gcd\n\n #inf = 10**17\n #mod = 10**9 + 7\n\n s = input().rstrip()\n if ('N' in s and 'S' in s) or ('N' not in s and 'S' not in s):\n if ('W' in s and 'E' in s) or ('W' not in s and 'E' not in s):\n print('Yes')\n exit()\n print('No')", "main", "import sys", "sys", "input = sys.stdin.readline", "input", "sys.stdin.readline", "sys.stdin", "sys", "stdin", "readline", "sys.setrecursionlimit(10**7)", "sys.setrecursionlimit", "sys", "setrecursionlimit", "10**7", "10", "7", "from collections import Counter, deque", "from itertools import combinations, permutations, accumulate, groupby, product", "from bisect import bisect_left,bisect_right", "from heapq import heapify, heappop, heappush", "import math", "math", "s = input().rstrip()", "s", "input().rstrip()", "().rstrip", "()", "input", "rstrip", "if ('N' in s and 'S' in s) or ('N' not in s and 'S' not in s):\n if ('W' in s and 'E' in s) or ('W' not in s and 'E' not in s):\n print('Yes')\n exit()\n ", "('N' in s and 'S' in s) or ('N' not in s and 'S' not in s)", "'N' in s and 'S' in s", "'N' in s", "'N'", "s", "'S' in s", "'S'", "s", "'N' not in s and 'S' not in s", "'N' not in s", "'N'", "s", "'S' not in s", "'S'", "s", "if ('W' in s and 'E' in s) or ('W' not in s and 'E' not in s):\n print('Yes')\n exit()\n ", "('W' in s and 'E' in s) or ('W' not in s and 'E' not in s)", "'W' in s and 'E' in s", "'W' in s", "'W'", "s", "'E' in s", "'E'", "s", "'W' not in s and 'E' not in s", "'W' not in s", "'W'", "s", "'E' not in s", "'E'", "s", "print('Yes')", "print", "'Yes'", "exit()", "exit", "print('No')", "print", "'No'", "if __name__ == '__main__':\n main()", "__name__ == '__main__'", "__name__", "'__main__'", "main()", "main", "def main():\n import sys\n input = sys.stdin.readline\n sys.setrecursionlimit(10**7)\n from collections import Counter, deque\n from itertools import combinations, permutations, accumulate, groupby, product\n from bisect import bisect_left,bisect_right\n from heapq import heapify, heappop, heappush\n import math\n #from math import gcd\n\n #inf = 10**17\n #mod = 10**9 + 7\n\n s = input().rstrip()\n if ('N' in s and 'S' in s) or ('N' not in s and 'S' not in s):\n if ('W' in s and 'E' in s) or ('W' not in s and 'E' not in s):\n print('Yes')\n exit()\n print('No')", "def main():\n import sys\n input = sys.stdin.readline\n sys.setrecursionlimit(10**7)\n from collections import Counter, deque\n from itertools import combinations, permutations, accumulate, groupby, product\n from bisect import bisect_left,bisect_right\n from heapq import heapify, heappop, heappush\n import math\n #from math import gcd\n\n #inf = 10**17\n #mod = 10**9 + 7\n\n s = input().rstrip()\n if ('N' in s and 'S' in s) or ('N' not in s and 'S' not in s):\n if ('W' in s and 'E' in s) or ('W' not in s and 'E' not in s):\n print('Yes')\n exit()\n print('No')", "main" ]
def main(): import sys input = sys.stdin.readline sys.setrecursionlimit(10**7) from collections import Counter, deque from itertools import combinations, permutations, accumulate, groupby, product from bisect import bisect_left,bisect_right from heapq import heapify, heappop, heappush import math #from math import gcd #inf = 10**17 #mod = 10**9 + 7 s = input().rstrip() if ('N' in s and 'S' in s) or ('N' not in s and 'S' not in s): if ('W' in s and 'E' in s) or ('W' not in s and 'E' not in s): print('Yes') exit() print('No') if __name__ == '__main__': main()
[ 7, 0, 13, 4, 13, 0, 13, 17, 13, 17, 0, 13, 13, 14, 2, 2, 2, 2, 17, 13, 2, 17, 13, 40, 2, 17, 13, 40, 2, 17, 13, 4, 13, 17, 4, 13, 14, 2, 2, 2, 2, 17, 13, 2, 17, 13, 40, 2, 17, 13, 40, 2, 17, 13, 4, 13, 17, 4, 13, 28, 13, 13, 14, 2, 13, 17, 0, 13, 17, 14, 2, 13, 17, 0, 13, 17, 14, 2, 13, 17, 0, 13, 17, 0, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 4, 13, 17, 4, 13, 17, 10, 17, 13, 10, 13, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13 ]
[ [ 119, 2 ], [ 110, 6 ], [ 122, 8 ], [ 104, 11 ], [ 120, 12 ], [ 105, 19 ], [ 105, 22 ], [ 105, 26 ], [ 105, 30 ], [ 105, 42 ], [ 105, 45 ], [ 105, 49 ], [ 105, 53 ], [ 61, 60 ], [ 120, 60 ], [ 60, 64 ], [ 107, 67 ], [ 60, 71 ], [ 116, 74 ], [ 60, 78 ], [ 101, 81 ], [ 113, 84 ], [ 114, 89 ], [ 102, 89 ], [ 111, 89 ], [ 117, 92 ], [ 108, 92 ], [ 123, 92 ], [ 101, 102 ], [ 120, 104 ], [ 104, 105 ], [ 107, 108 ], [ 110, 111 ], [ 113, 114 ], [ 116, 117 ], [ 119, 120 ], [ 122, 123 ] ]
[ "s=input()\nx,y=0,0\nli=s\nif 'N' in li and 'S' in li and not 'E' in li and not 'W' in li:\n print('Yes')\n exit()\n \nif 'E' in li and 'W' in li and not 'S' in li and not 'N' in li:\n print('Yes')\n exit()\n \nfor i in s:\n if(i=='N'):\n y+=1\n elif(i=='S'):\n y-=1\n elif(i=='W'):\n x-=1\n else:\n x+=1\nif(x==0 and y==0):\n print(\"Yes\")\nelse:\n print(\"No\")", "s=input()", "s", "input()", "input", "x,y=0,0", "x", "0", "y", "0", "li=s", "li", "s", "if 'N' in li and 'S' in li and not 'E' in li and not 'W' in li:\n print('Yes')\n exit()\n ", "'N' in li and 'S' in li and not 'E' in li and not 'W' in li", "'N' in li and 'S' in li and not 'E' in li", "'N' in li and 'S' in li", "'N' in li", "'N'", "li", "'S' in li", "'S'", "li", "not 'E' in li", "'E' in li", "'E'", "li", "not 'W' in li", "'W' in li", "'W'", "li", "print('Yes')", "print", "'Yes'", "exit()", "exit", "if 'E' in li and 'W' in li and not 'S' in li and not 'N' in li:\n print('Yes')\n exit()\n ", "'E' in li and 'W' in li and not 'S' in li and not 'N' in li", "'E' in li and 'W' in li and not 'S' in li", "'E' in li and 'W' in li", "'E' in li", "'E'", "li", "'W' in li", "'W'", "li", "not 'S' in li", "'S' in li", "'S'", "li", "not 'N' in li", "'N' in li", "'N'", "li", "print('Yes')", "print", "'Yes'", "exit()", "exit", "for i in s:\n if(i=='N'):\n y+=1\n elif(i=='S'):\n y-=1\n elif(i=='W'):\n x-=1\n else:\n x+=1", "i", "s", "if(i=='N'):\n y+=1\n elif(i=='S'):\n y-=1\n elif(i=='W'):\n x-=1\n else:\n x+=1", "i=='N'", "i", "'N'", "y+=1", "y", "1", "elif(i=='S'):\n y-=1\n ", "i=='S'", "i", "'S'", "y-=1", "y", "1", "elif(i=='W'):\n x-=1\n ", "i=='W'", "i", "'W'", "x-=1", "x", "1", "x+=1", "x", "1", "if(x==0 and y==0):\n print(\"Yes\")\nelse:\n print(\"No\")", "x==0 and y==0", "x==0", "x", "0", "y==0", "y", "0", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "x-=1", "1", "x", "li=s", "s", "li", "y+=1", "1", "y", "x,y=0,0", "0", "x", "x+=1", "1", "x", "y-=1", "1", "y", "s=input()", "input()", "s", "y=0,0", "0", "y" ]
s=input() x,y=0,0 li=s if 'N' in li and 'S' in li and not 'E' in li and not 'W' in li: print('Yes') exit() if 'E' in li and 'W' in li and not 'S' in li and not 'N' in li: print('Yes') exit() for i in s: if(i=='N'): y+=1 elif(i=='S'): y-=1 elif(i=='W'): x-=1 else: x+=1 if(x==0 and y==0): print("Yes") else: print("No")
[ 7, 15, 13, 0, 13, 4, 13, 14, 2, 17, 13, 14, 40, 17, 13, 4, 13, 17, 4, 18, 13, 13, 14, 2, 17, 13, 14, 40, 17, 13, 4, 13, 17, 4, 18, 13, 13, 14, 2, 17, 13, 14, 40, 17, 13, 4, 13, 17, 4, 18, 13, 13, 14, 2, 17, 13, 14, 40, 17, 13, 4, 13, 17, 4, 18, 13, 13, 4, 13, 17, 10, 4, 13 ]
[ [ 71, 4 ], [ 72, 10 ], [ 72, 14 ], [ 72, 25 ], [ 72, 29 ], [ 72, 40 ], [ 72, 44 ], [ 72, 55 ], [ 72, 59 ], [ 71, 72 ] ]
[ "import sys\ns = input()\nif 'N' in s:\n if 'S' not in s:\n print('No')\n sys.exit()\nif 'W' in s:\n if 'E' not in s:\n print('No')\n sys.exit()\nif 'E' in s:\n if 'W' not in s:\n print('No')\n sys.exit()\nif 'S' in s:\n if 'N' not in s:\n print('No')\n sys.exit()\nprint('Yes')", "import sys", "sys", "s = input()", "s", "input()", "input", "if 'N' in s:\n if 'S' not in s:\n print('No')\n sys.exit()", "'N' in s", "'N'", "s", "if 'S' not in s:\n print('No')\n sys.exit()", "'S' not in s", "'S'", "s", "print('No')", "print", "'No'", "sys.exit()", "sys.exit", "sys", "exit", "if 'W' in s:\n if 'E' not in s:\n print('No')\n sys.exit()", "'W' in s", "'W'", "s", "if 'E' not in s:\n print('No')\n sys.exit()", "'E' not in s", "'E'", "s", "print('No')", "print", "'No'", "sys.exit()", "sys.exit", "sys", "exit", "if 'E' in s:\n if 'W' not in s:\n print('No')\n sys.exit()", "'E' in s", "'E'", "s", "if 'W' not in s:\n print('No')\n sys.exit()", "'W' not in s", "'W'", "s", "print('No')", "print", "'No'", "sys.exit()", "sys.exit", "sys", "exit", "if 'S' in s:\n if 'N' not in s:\n print('No')\n sys.exit()", "'S' in s", "'S'", "s", "if 'N' not in s:\n print('No')\n sys.exit()", "'N' not in s", "'N'", "s", "print('No')", "print", "'No'", "sys.exit()", "sys.exit", "sys", "exit", "print('Yes')", "print", "'Yes'", "s = input()", "input()", "s" ]
import sys s = input() if 'N' in s: if 'S' not in s: print('No') sys.exit() if 'W' in s: if 'E' not in s: print('No') sys.exit() if 'E' in s: if 'W' not in s: print('No') sys.exit() if 'S' in s: if 'N' not in s: print('No') sys.exit() print('Yes')
[ 7, 15, 0, 13, 4, 13, 0, 13, 4, 13, 13, 28, 13, 13, 0, 18, 13, 13, 17, 14, 2, 40, 18, 13, 17, 18, 13, 17, 40, 18, 13, 17, 18, 13, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13 ]
[ [ 45, 3 ], [ 42, 7 ], [ 13, 12 ], [ 46, 12 ], [ 18, 15 ], [ 43, 16 ], [ 12, 17 ], [ 43, 23 ], [ 43, 26 ], [ 43, 30 ], [ 43, 33 ], [ 42, 43 ], [ 45, 46 ] ]
[ "from collections import defaultdict\n\nS = input()\ndic = defaultdict(bool)\nfor s in S:\n dic[s] = True\nif dic[\"N\"] != dic[\"S\"] or dic[\"W\"] != dic[\"E\"]:\n print(\"No\")\nelse:\n print(\"Yes\")", "from collections import defaultdict", "S = input()", "S", "input()", "input", "dic = defaultdict(bool)", "dic", "defaultdict(bool)", "defaultdict", "bool", "for s in S:\n dic[s] = True", "s", "S", "dic[s] = True", "dic[s]", "dic", "s", "True", "if dic[\"N\"] != dic[\"S\"] or dic[\"W\"] != dic[\"E\"]:\n print(\"No\")\nelse:\n print(\"Yes\")", "dic[\"N\"] != dic[\"S\"] or dic[\"W\"] != dic[\"E\"]", "dic[\"N\"] != dic[\"S\"]", "dic[\"N\"]", "dic", "\"N\"", "dic[\"S\"]", "dic", "\"S\"", "dic[\"W\"] != dic[\"E\"]", "dic[\"W\"]", "dic", "\"W\"", "dic[\"E\"]", "dic", "\"E\"", "print(\"No\")", "print", "\"No\"", "print(\"Yes\")", "print", "\"Yes\"", "dic = defaultdict(bool)", "defaultdict(bool)", "dic", "S = input()", "input()", "S" ]
from collections import defaultdict S = input() dic = defaultdict(bool) for s in S: dic[s] = True if dic["N"] != dic["S"] or dic["W"] != dic["E"]: print("No") else: print("Yes")
[ 7, 0, 13, 4, 13, 0, 13, 17, 14, 2, 17, 13, 14, 40, 17, 13, 0, 13, 17, 14, 2, 17, 13, 14, 40, 17, 13, 0, 13, 17, 14, 2, 17, 13, 14, 40, 17, 13, 0, 13, 17, 14, 2, 17, 13, 14, 40, 17, 13, 0, 13, 17, 14, 2, 13, 17, 4, 13, 17, 4, 13, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 72, 2 ], [ 69, 6 ], [ 73, 11 ], [ 73, 15 ], [ 75, 17 ], [ 73, 22 ], [ 73, 26 ], [ 66, 28 ], [ 73, 33 ], [ 73, 37 ], [ 78, 39 ], [ 73, 44 ], [ 73, 48 ], [ 63, 50 ], [ 64, 54 ], [ 79, 54 ], [ 67, 54 ], [ 76, 54 ], [ 70, 54 ], [ 64, 61 ], [ 79, 61 ], [ 67, 61 ], [ 76, 61 ], [ 70, 61 ], [ 63, 64 ], [ 66, 67 ], [ 69, 70 ], [ 72, 73 ], [ 75, 76 ], [ 78, 79 ] ]
[ "s=input()\nres = ''\nif 'N' in s:\n if 'S' not in s:\n res = 'No'\nif 'S' in s:\n if 'N' not in s:\n res = 'No'\nif 'E' in s:\n if 'W' not in s:\n res = 'No'\nif 'W' in s:\n if 'E' not in s:\n res = 'No'\nif res == '':\n print('Yes')\nelse:\n print(res)\n", "s=input()", "s", "input()", "input", "res = ''", "res", "''", "if 'N' in s:\n if 'S' not in s:\n res = 'No'", "'N' in s", "'N'", "s", "if 'S' not in s:\n res = 'No'", "'S' not in s", "'S'", "s", "res = 'No'", "res", "'No'", "if 'S' in s:\n if 'N' not in s:\n res = 'No'", "'S' in s", "'S'", "s", "if 'N' not in s:\n res = 'No'", "'N' not in s", "'N'", "s", "res = 'No'", "res", "'No'", "if 'E' in s:\n if 'W' not in s:\n res = 'No'", "'E' in s", "'E'", "s", "if 'W' not in s:\n res = 'No'", "'W' not in s", "'W'", "s", "res = 'No'", "res", "'No'", "if 'W' in s:\n if 'E' not in s:\n res = 'No'", "'W' in s", "'W'", "s", "if 'E' not in s:\n res = 'No'", "'E' not in s", "'E'", "s", "res = 'No'", "res", "'No'", "if res == '':\n print('Yes')\nelse:\n print(res)", "res == ''", "res", "''", "print('Yes')", "print", "'Yes'", "print(res)", "print", "res", "res = 'No'", "'No'", "res", "res = 'No'", "'No'", "res", "res = ''", "''", "res", "s=input()", "input()", "s", "res = 'No'", "'No'", "res", "res = 'No'", "'No'", "res" ]
s=input() res = '' if 'N' in s: if 'S' not in s: res = 'No' if 'S' in s: if 'N' not in s: res = 'No' if 'E' in s: if 'W' not in s: res = 'No' if 'W' in s: if 'E' not in s: res = 'No' if res == '': print('Yes') else: print(res)
[ 7, 0, 13, 4, 13, 0, 13, 17, 0, 13, 2, 17, 13, 0, 13, 2, 17, 13, 0, 13, 2, 17, 13, 0, 13, 2, 17, 13, 14, 2, 2, 13, 13, 2, 13, 13, 0, 13, 17, 4, 13, 13, 10, 2, 13, 10, 2, 13, 10, 17, 13, 10, 4, 13, 10, 2, 13, 10, 17, 13, 10, 2, 13 ]
[ [ 52, 2 ], [ 58, 6 ], [ 55, 9 ], [ 53, 12 ], [ 61, 14 ], [ 53, 17 ], [ 46, 19 ], [ 53, 22 ], [ 43, 24 ], [ 53, 27 ], [ 56, 31 ], [ 44, 32 ], [ 62, 34 ], [ 47, 35 ], [ 49, 37 ], [ 50, 41 ], [ 59, 41 ], [ 43, 44 ], [ 46, 47 ], [ 49, 50 ], [ 52, 53 ], [ 55, 56 ], [ 58, 59 ], [ 61, 62 ] ]
[ "s = input()\nans = 'Yes'\ncn = 'N' in s\nce = 'E' in s\ncw = 'W' in s\ncs = 'S' in s\nif (cn ^ cs) or (ce ^ cw):\n ans = 'No'\nprint(ans)", "s = input()", "s", "input()", "input", "ans = 'Yes'", "ans", "'Yes'", "cn = 'N' in s", "cn", "'N' in s", "'N'", "s", "ce = 'E' in s", "ce", "'E' in s", "'E'", "s", "cw = 'W' in s", "cw", "'W' in s", "'W'", "s", "cs = 'S' in s", "cs", "'S' in s", "'S'", "s", "if (cn ^ cs) or (ce ^ cw):\n ans = 'No'", "(cn ^ cs) or (ce ^ cw)", "cn ^ cs", "cn", "cs", "ce ^ cw", "ce", "cw", "ans = 'No'", "ans", "'No'", "print(ans)", "print", "ans", "cs = 'S' in s", "'S' in s", "cs", "cw = 'W' in s", "'W' in s", "cw", "ans = 'No'", "'No'", "ans", "s = input()", "input()", "s", "cn = 'N' in s", "'N' in s", "cn", "ans = 'Yes'", "'Yes'", "ans", "ce = 'E' in s", "'E' in s", "ce" ]
s = input() ans = 'Yes' cn = 'N' in s ce = 'E' in s cw = 'W' in s cs = 'S' in s if (cn ^ cs) or (ce ^ cw): ans = 'No' print(ans)
[ 7, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 0, 13, 17, 14, 2, 2, 2, 17, 13, 40, 2, 17, 13, 2, 2, 17, 13, 40, 2, 17, 13, 14, 2, 2, 2, 17, 13, 40, 2, 17, 13, 2, 2, 17, 13, 40, 2, 17, 13, 14, 2, 2, 2, 2, 17, 13, 2, 17, 13, 2, 17, 13, 2, 17, 13, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 14, 40, 2, 2, 2, 13, 13, 2, 13, 13, 2, 2, 13, 13, 2, 13, 13, 14, 2, 2, 13, 13, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13 ]
[ [ 124, 2 ], [ 127, 6 ], [ 139, 9 ], [ 118, 12 ], [ 125, 19 ], [ 125, 23 ], [ 125, 27 ], [ 125, 31 ], [ 125, 37 ], [ 125, 41 ], [ 125, 45 ], [ 125, 49 ], [ 125, 56 ], [ 125, 59 ], [ 125, 62 ], [ 125, 65 ], [ 136, 67 ], [ 125, 70 ], [ 133, 74 ], [ 125, 77 ], [ 121, 81 ], [ 125, 84 ], [ 130, 88 ], [ 125, 91 ], [ 137, 99 ], [ 134, 100 ], [ 122, 102 ], [ 131, 103 ], [ 137, 106 ], [ 134, 107 ], [ 131, 109 ], [ 122, 110 ], [ 128, 114 ], [ 140, 115 ], [ 119, 116 ], [ 118, 119 ], [ 121, 122 ], [ 124, 125 ], [ 127, 128 ], [ 130, 131 ], [ 133, 134 ], [ 136, 137 ], [ 139, 140 ] ]
[ "string = input()\n\nc1 = True\nc2 = True\nc3 = True\n\nif (\"W\" in string and not(\"E\" in string)) or \"E\" in string and not(\"W\" in string): c1 = False\n \nif (\"N\" in string and not(\"S\" in string)) or \"S\" in string and not(\"N\" in string): c2 = False\n\nif \"N\" in string and \"S\" in string and \"E\" in string and \"W\" in string:\n N = string.count(\"N\")\n S = string.count(\"S\")\n W = string.count(\"W\")\n E = string.count(\"E\")\n if not(N/S == W/E or N/S == E/W): c3 = False\n \nif c1 and c2 and c3: print(\"Yes\")\nelse: print(\"No\")", "string = input()", "string", "input()", "input", "c1 = True", "c1", "True", "c2 = True", "c2", "True", "c3 = True", "c3", "True", "if (\"W\" in string and not(\"E\" in string)) or \"E\" in string and not(\"W\" in string): c1 = False\n ", "(\"W\" in string and not(\"E\" in string)) or \"E\" in string and not(\"W\" in string)", "\"W\" in string and not(\"E\" in string)", "\"W\" in string", "\"W\"", "string", "not(\"E\" in string)", "\"E\" in string", "\"E\"", "string", "\"E\" in string and not(\"W\" in string)", "\"E\" in string", "\"E\"", "string", "not(\"W\" in string)", "\"W\" in string", "\"W\"", "string", "if (\"N\" in string and not(\"S\" in string)) or \"S\" in string and not(\"N\" in string): c2 = False", "(\"N\" in string and not(\"S\" in string)) or \"S\" in string and not(\"N\" in string)", "\"N\" in string and not(\"S\" in string)", "\"N\" in string", "\"N\"", "string", "not(\"S\" in string)", "\"S\" in string", "\"S\"", "string", "\"S\" in string and not(\"N\" in string)", "\"S\" in string", "\"S\"", "string", "not(\"N\" in string)", "\"N\" in string", "\"N\"", "string", "if \"N\" in string and \"S\" in string and \"E\" in string and \"W\" in string:\n N = string.count(\"N\")\n S = string.count(\"S\")\n W = string.count(\"W\")\n E = string.count(\"E\")\n if not(N/S == W/E or N/S == E/W): c3 = False\n ", "\"N\" in string and \"S\" in string and \"E\" in string and \"W\" in string", "\"N\" in string and \"S\" in string and \"E\" in string", "\"N\" in string and \"S\" in string", "\"N\" in string", "\"N\"", "string", "\"S\" in string", "\"S\"", "string", "\"E\" in string", "\"E\"", "string", "\"W\" in string", "\"W\"", "string", "N = string.count(\"N\")", "N", "string.count(\"N\")", "string.count", "string", "count", "\"N\"", "S = string.count(\"S\")", "S", "string.count(\"S\")", "string.count", "string", "count", "\"S\"", "W = string.count(\"W\")", "W", "string.count(\"W\")", "string.count", "string", "count", "\"W\"", "E = string.count(\"E\")", "E", "string.count(\"E\")", "string.count", "string", "count", "\"E\"", "if not(N/S == W/E or N/S == E/W): c3 = False\n ", "not(N/S == W/E or N/S == E/W)", "N/S == W/E or N/S == E/W", "N/S == W/E", "N/S", "N", "S", "W/E", "W", "E", "N/S == E/W", "N/S", "N", "S", "E/W", "E", "W", "if c1 and c2 and c3: print(\"Yes\")\nelse: print(\"No\")", "c1 and c2 and c3", "c1 and c2", "c1", "c2", "c3", "c3 = True", "True", "c3", "W = string.count(\"W\")", "string.count(\"W\")", "W", "string = input()", "input()", "string", "c1 = True", "True", "c1", "E = string.count(\"E\")", "string.count(\"E\")", "E", "S = string.count(\"S\")", "string.count(\"S\")", "S", "N = string.count(\"N\")", "string.count(\"N\")", "N", "c2 = True", "True", "c2" ]
string = input() c1 = True c2 = True c3 = True if ("W" in string and not("E" in string)) or "E" in string and not("W" in string): c1 = False if ("N" in string and not("S" in string)) or "S" in string and not("N" in string): c2 = False if "N" in string and "S" in string and "E" in string and "W" in string: N = string.count("N") S = string.count("S") W = string.count("W") E = string.count("E") if not(N/S == W/E or N/S == E/W): c3 = False if c1 and c2 and c3: print("Yes") else: print("No")
[ 7, 0, 13, 4, 13, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 17, 14, 2, 13, 17, 0, 13, 17, 14, 2, 13, 17, 0, 13, 17, 14, 2, 13, 17, 0, 13, 17, 14, 2, 13, 17, 0, 13, 17, 14, 2, 13, 17, 4, 13, 17, 4, 13, 17, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 78, 2 ], [ 102, 6 ], [ 79, 9 ], [ 90, 13 ], [ 79, 16 ], [ 96, 20 ], [ 79, 23 ], [ 99, 27 ], [ 79, 30 ], [ 75, 34 ], [ 103, 38 ], [ 93, 41 ], [ 91, 45 ], [ 87, 48 ], [ 97, 52 ], [ 84, 55 ], [ 100, 59 ], [ 81, 62 ], [ 82, 66 ], [ 85, 66 ], [ 88, 66 ], [ 94, 66 ], [ 76, 66 ], [ 75, 76 ], [ 78, 79 ], [ 81, 82 ], [ 84, 85 ], [ 87, 88 ], [ 90, 91 ], [ 93, 94 ], [ 96, 97 ], [ 99, 100 ], [ 102, 103 ] ]
[ "S = input()\n\nn = S.count('N')\ns = S.count('S')\nw = S.count('W')\ne = S.count('E')\na = 0\n\nif n > 0:\n a += 1\nif s > 0:\n a -= 1\nif w > 0:\n a += 2\nif e > 0:\n a -= 2\n\nif a == 0:\n print(\"Yes\")\nelse:\n print(\"No\")", "S = input()", "S", "input()", "input", "n = S.count('N')", "n", "S.count('N')", "S.count", "S", "count", "'N'", "s = S.count('S')", "s", "S.count('S')", "S.count", "S", "count", "'S'", "w = S.count('W')", "w", "S.count('W')", "S.count", "S", "count", "'W'", "e = S.count('E')", "e", "S.count('E')", "S.count", "S", "count", "'E'", "a = 0", "a", "0", "if n > 0:\n a += 1", "n > 0", "n", "0", "a += 1", "a", "1", "if s > 0:\n a -= 1", "s > 0", "s", "0", "a -= 1", "a", "1", "if w > 0:\n a += 2", "w > 0", "w", "0", "a += 2", "a", "2", "if e > 0:\n a -= 2", "e > 0", "e", "0", "a -= 2", "a", "2", "if a == 0:\n print(\"Yes\")\nelse:\n print(\"No\")", "a == 0", "a", "0", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "a = 0", "0", "a", "S = input()", "input()", "S", "a -= 2", "2", "a", "a += 2", "2", "a", "a -= 1", "1", "a", "s = S.count('S')", "S.count('S')", "s", "a += 1", "1", "a", "w = S.count('W')", "S.count('W')", "w", "e = S.count('E')", "S.count('E')", "e", "n = S.count('N')", "S.count('N')", "n" ]
S = input() n = S.count('N') s = S.count('S') w = S.count('W') e = S.count('E') a = 0 if n > 0: a += 1 if s > 0: a -= 1 if w > 0: a += 2 if e > 0: a -= 2 if a == 0: print("Yes") else: print("No")
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 0, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 0, 13, 17, 14, 13, 4, 13, 17, 4, 13, 17, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 87, 2 ], [ 84, 8 ], [ 75, 11 ], [ 88, 14 ], [ 78, 18 ], [ 88, 21 ], [ 72, 25 ], [ 88, 28 ], [ 90, 32 ], [ 88, 35 ], [ 76, 41 ], [ 79, 44 ], [ 81, 47 ], [ 73, 52 ], [ 91, 55 ], [ 69, 58 ], [ 69, 70 ], [ 72, 73 ], [ 75, 76 ], [ 78, 79 ], [ 81, 82 ], [ 84, 85 ], [ 87, 88 ], [ 90, 91 ] ]
[ "S = list(input())\n\nres = True\n\nn = S.count(\"N\")\ns = S.count(\"S\")\nw = S.count(\"W\")\ne = S.count(\"E\")\n\nif (n > 0) ^ (s > 0):\n res = False\n\nif (w > 0) ^ (e > 0):\n res = False\n\nif res:\n print(\"Yes\")\nelse:\n print(\"No\")\n", "S = list(input())", "S", "list(input())", "list", "input()", "input", "res = True", "res", "True", "n = S.count(\"N\")", "n", "S.count(\"N\")", "S.count", "S", "count", "\"N\"", "s = S.count(\"S\")", "s", "S.count(\"S\")", "S.count", "S", "count", "\"S\"", "w = S.count(\"W\")", "w", "S.count(\"W\")", "S.count", "S", "count", "\"W\"", "e = S.count(\"E\")", "e", "S.count(\"E\")", "S.count", "S", "count", "\"E\"", "if (n > 0) ^ (s > 0):\n res = False", "(n > 0) ^ (s > 0)", "n > 0", "n", "0", "s > 0", "s", "0", "res = False", "res", "False", "if (w > 0) ^ (e > 0):\n res = False", "(w > 0) ^ (e > 0)", "w > 0", "w", "0", "e > 0", "e", "0", "res = False", "res", "False", "if res:\n print(\"Yes\")\nelse:\n print(\"No\")", "res", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "res = False", "False", "res", "w = S.count(\"W\")", "S.count(\"W\")", "w", "n = S.count(\"N\")", "S.count(\"N\")", "n", "s = S.count(\"S\")", "S.count(\"S\")", "s", "res = False", "False", "res", "res = True", "True", "res", "S = list(input())", "list(input())", "S", "e = S.count(\"E\")", "S.count(\"E\")", "e" ]
S = list(input()) res = True n = S.count("N") s = S.count("S") w = S.count("W") e = S.count("E") if (n > 0) ^ (s > 0): res = False if (w > 0) ^ (e > 0): res = False if res: print("Yes") else: print("No")
[ 7, 0, 13, 4, 13, 4, 13, 14, 2, 2, 2, 2, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 4, 13, 17, 14, 2, 2, 2, 2, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 4, 13, 17, 14, 2, 2, 2, 2, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13 ]
[ [ 116, 2 ], [ 117, 14 ], [ 117, 21 ], [ 117, 28 ], [ 117, 35 ], [ 117, 49 ], [ 117, 56 ], [ 117, 63 ], [ 117, 70 ], [ 117, 84 ], [ 117, 91 ], [ 117, 98 ], [ 117, 105 ], [ 116, 117 ] ]
[ "N = str(input())\n\nif N.count(\"N\") > 0 and N.count(\"W\") > 0 and N.count(\"S\") > 0 and N.count(\"E\") > 0:\n print(\"Yes\")\nelif N.count(\"N\") > 0 and N.count(\"W\") == 0 and N.count(\"S\") > 0 and N.count(\"E\") == 0:\n print(\"Yes\")\nelif N.count(\"N\") == 0 and N.count(\"W\") > 0 and N.count(\"S\") == 0 and N.count(\"E\") > 0:\n print(\"Yes\")\nelse:\n print(\"No\")", "N = str(input())", "N", "str(input())", "str", "input()", "input", "if N.count(\"N\") > 0 and N.count(\"W\") > 0 and N.count(\"S\") > 0 and N.count(\"E\") > 0:\n print(\"Yes\")\nelif N.count(\"N\") > 0 and N.count(\"W\") == 0 and N.count(\"S\") > 0 and N.count(\"E\") == 0:\n print(\"Yes\")\nelif N.count(\"N\") == 0 and N.count(\"W\") > 0 and N.count(\"S\") == 0 and N.count(\"E\") > 0:\n print(\"Yes\")\nelse:\n print(\"No\")", "N.count(\"N\") > 0 and N.count(\"W\") > 0 and N.count(\"S\") > 0 and N.count(\"E\") > 0", "N.count(\"N\") > 0 and N.count(\"W\") > 0 and N.count(\"S\") > 0", "N.count(\"N\") > 0 and N.count(\"W\") > 0", "N.count(\"N\") > 0", "N.count(\"N\")", "N.count", "N", "count", "\"N\"", "0", "N.count(\"W\") > 0", "N.count(\"W\")", "N.count", "N", "count", "\"W\"", "0", "N.count(\"S\") > 0", "N.count(\"S\")", "N.count", "N", "count", "\"S\"", "0", "N.count(\"E\") > 0", "N.count(\"E\")", "N.count", "N", "count", "\"E\"", "0", "print(\"Yes\")", "print", "\"Yes\"", "elif N.count(\"N\") > 0 and N.count(\"W\") == 0 and N.count(\"S\") > 0 and N.count(\"E\") == 0:\n print(\"Yes\")", "N.count(\"N\") > 0 and N.count(\"W\") == 0 and N.count(\"S\") > 0 and N.count(\"E\") == 0", "N.count(\"N\") > 0 and N.count(\"W\") == 0 and N.count(\"S\") > 0", "N.count(\"N\") > 0 and N.count(\"W\") == 0", "N.count(\"N\") > 0", "N.count(\"N\")", "N.count", "N", "count", "\"N\"", "0", "N.count(\"W\") == 0", "N.count(\"W\")", "N.count", "N", "count", "\"W\"", "0", "N.count(\"S\") > 0", "N.count(\"S\")", "N.count", "N", "count", "\"S\"", "0", "N.count(\"E\") == 0", "N.count(\"E\")", "N.count", "N", "count", "\"E\"", "0", "print(\"Yes\")", "print", "\"Yes\"", "elif N.count(\"N\") == 0 and N.count(\"W\") > 0 and N.count(\"S\") == 0 and N.count(\"E\") > 0:\n print(\"Yes\")", "N.count(\"N\") == 0 and N.count(\"W\") > 0 and N.count(\"S\") == 0 and N.count(\"E\") > 0", "N.count(\"N\") == 0 and N.count(\"W\") > 0 and N.count(\"S\") == 0", "N.count(\"N\") == 0 and N.count(\"W\") > 0", "N.count(\"N\") == 0", "N.count(\"N\")", "N.count", "N", "count", "\"N\"", "0", "N.count(\"W\") > 0", "N.count(\"W\")", "N.count", "N", "count", "\"W\"", "0", "N.count(\"S\") == 0", "N.count(\"S\")", "N.count", "N", "count", "\"S\"", "0", "N.count(\"E\") > 0", "N.count(\"E\")", "N.count", "N", "count", "\"E\"", "0", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "N = str(input())", "str(input())", "N" ]
N = str(input()) if N.count("N") > 0 and N.count("W") > 0 and N.count("S") > 0 and N.count("E") > 0: print("Yes") elif N.count("N") > 0 and N.count("W") == 0 and N.count("S") > 0 and N.count("E") == 0: print("Yes") elif N.count("N") == 0 and N.count("W") > 0 and N.count("S") == 0 and N.count("E") > 0: print("Yes") else: print("No")
[ 7, 0, 13, 4, 13, 14, 2, 2, 2, 40, 4, 18, 13, 13, 17, 17, 40, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 4, 13, 17, 14, 2, 2, 2, 40, 4, 18, 13, 13, 17, 17, 40, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 4, 13, 17, 14, 2, 2, 2, 40, 4, 18, 13, 13, 17, 17, 40, 4, 18, 13, 13, 17, 17, 40, 4, 18, 13, 13, 17, 17, 40, 4, 18, 13, 13, 17, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13 ]
[ [ 114, 2 ], [ 115, 12 ], [ 115, 19 ], [ 115, 26 ], [ 115, 33 ], [ 115, 47 ], [ 115, 54 ], [ 115, 61 ], [ 115, 68 ], [ 115, 82 ], [ 115, 89 ], [ 115, 96 ], [ 115, 103 ], [ 114, 115 ] ]
[ "S = input()\n\nif S.count('N') >= 1 and S.count('S') >= 1 and S.count('E') == 0 and S.count('W') == 0:\n print('Yes')\nelif S.count('E') >= 1 and S.count('W') >= 1 and S.count('N') == 0 and S.count('S') == 0:\n print('Yes')\nelif S.count('E') >= 1 and S.count('W') >= 1 and S.count('N') >= 1 and S.count('S') >= 1:\n print('Yes')\nelse: \n print('No')", "S = input()", "S", "input()", "input", "if S.count('N') >= 1 and S.count('S') >= 1 and S.count('E') == 0 and S.count('W') == 0:\n print('Yes')\nelif S.count('E') >= 1 and S.count('W') >= 1 and S.count('N') == 0 and S.count('S') == 0:\n print('Yes')\nelif S.count('E') >= 1 and S.count('W') >= 1 and S.count('N') >= 1 and S.count('S') >= 1:\n print('Yes')\nelse: \n print('No')", "S.count('N') >= 1 and S.count('S') >= 1 and S.count('E') == 0 and S.count('W') == 0", "S.count('N') >= 1 and S.count('S') >= 1 and S.count('E') == 0", "S.count('N') >= 1 and S.count('S') >= 1", "S.count('N') >= 1", "S.count('N')", "S.count", "S", "count", "'N'", "1", "S.count('S') >= 1", "S.count('S')", "S.count", "S", "count", "'S'", "1", "S.count('E') == 0", "S.count('E')", "S.count", "S", "count", "'E'", "0", "S.count('W') == 0", "S.count('W')", "S.count", "S", "count", "'W'", "0", "print('Yes')", "print", "'Yes'", "elif S.count('E') >= 1 and S.count('W') >= 1 and S.count('N') == 0 and S.count('S') == 0:\n print('Yes')", "S.count('E') >= 1 and S.count('W') >= 1 and S.count('N') == 0 and S.count('S') == 0", "S.count('E') >= 1 and S.count('W') >= 1 and S.count('N') == 0", "S.count('E') >= 1 and S.count('W') >= 1", "S.count('E') >= 1", "S.count('E')", "S.count", "S", "count", "'E'", "1", "S.count('W') >= 1", "S.count('W')", "S.count", "S", "count", "'W'", "1", "S.count('N') == 0", "S.count('N')", "S.count", "S", "count", "'N'", "0", "S.count('S') == 0", "S.count('S')", "S.count", "S", "count", "'S'", "0", "print('Yes')", "print", "'Yes'", "elif S.count('E') >= 1 and S.count('W') >= 1 and S.count('N') >= 1 and S.count('S') >= 1:\n print('Yes')", "S.count('E') >= 1 and S.count('W') >= 1 and S.count('N') >= 1 and S.count('S') >= 1", "S.count('E') >= 1 and S.count('W') >= 1 and S.count('N') >= 1", "S.count('E') >= 1 and S.count('W') >= 1", "S.count('E') >= 1", "S.count('E')", "S.count", "S", "count", "'E'", "1", "S.count('W') >= 1", "S.count('W')", "S.count", "S", "count", "'W'", "1", "S.count('N') >= 1", "S.count('N')", "S.count", "S", "count", "'N'", "1", "S.count('S') >= 1", "S.count('S')", "S.count", "S", "count", "'S'", "1", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "S = input()", "input()", "S" ]
S = input() if S.count('N') >= 1 and S.count('S') >= 1 and S.count('E') == 0 and S.count('W') == 0: print('Yes') elif S.count('E') >= 1 and S.count('W') >= 1 and S.count('N') == 0 and S.count('S') == 0: print('Yes') elif S.count('E') >= 1 and S.count('W') >= 1 and S.count('N') >= 1 and S.count('S') >= 1: print('Yes') else: print('No')
[ 7, 15, 13, 12, 13, 29, 4, 18, 4, 18, 18, 13, 13, 13, 13, 0, 13, 21, 22, 17, 17, 22, 17, 17, 22, 17, 17, 22, 17, 17, 12, 13, 28, 13, 13, 0, 18, 13, 13, 17, 14, 40, 18, 13, 17, 18, 13, 17, 29, 17, 14, 40, 18, 13, 17, 18, 13, 17, 29, 17, 29, 17, 23, 13, 0, 13, 4, 13, 4, 13, 8, 4, 13, 13, 17, 17, 10, 4, 13, 10, 21, 13, 10, 12, 13, 10, 12, 13 ]
[ [ 80, 16 ], [ 34, 33 ], [ 63, 33 ], [ 39, 36 ], [ 81, 37 ], [ 33, 38 ], [ 81, 43 ], [ 81, 46 ], [ 81, 53 ], [ 81, 56 ], [ 63, 63 ], [ 77, 65 ], [ 84, 67 ], [ 87, 72 ], [ 78, 73 ], [ 77, 78 ], [ 80, 81 ] ]
[ "import sys\ndef input():\n return sys.stdin.readline().rstrip()\n\nma={\"N\":0,\"S\":0,\"E\":0,\"W\":0}\n\ndef func(S):\n for x in S:\n ma[x]=1\n if ma[\"N\"]!=ma[\"S\"]:\n return False\n if ma[\"W\"]!=ma[\"E\"]:\n return False\n return True\n\nS=input()\nprint(\"Yes\" if func(S) else \"No\")", "import sys", "sys", "def input():\n return sys.stdin.readline().rstrip()", "input", "return sys.stdin.readline().rstrip()", "sys.stdin.readline().rstrip()", "sys.stdin.readline().rstrip", "sys.stdin.readline()", "sys.stdin.readline", "sys.stdin", "sys", "stdin", "readline", "rstrip", "ma={\"N\":0,\"S\":0,\"E\":0,\"W\":0}", "ma", "{\"N\":0,\"S\":0,\"E\":0,\"W\":0}", "\"N\"", "\"N\"", "0", "\"S\"", "\"S\"", "0", "\"E\"", "\"E\"", "0", "\"W\"", "\"W\"", "0", "def func(S):\n for x in S:\n ma[x]=1\n if ma[\"N\"]!=ma[\"S\"]:\n return False\n if ma[\"W\"]!=ma[\"E\"]:\n return False\n return True", "func", "for x in S:\n ma[x]=1\n ", "x", "S", "ma[x]=1", "ma[x]", "ma", "x", "1", "if ma[\"N\"]!=ma[\"S\"]:\n return False\n ", "ma[\"N\"]!=ma[\"S\"]", "ma[\"N\"]", "ma", "\"N\"", "ma[\"S\"]", "ma", "\"S\"", "return False", "False", "if ma[\"W\"]!=ma[\"E\"]:\n return False\n ", "ma[\"W\"]!=ma[\"E\"]", "ma[\"W\"]", "ma", "\"W\"", "ma[\"E\"]", "ma", "\"E\"", "return False", "False", "return True", "True", "S", "S", "S=input()", "S", "input()", "input", "print(\"Yes\" if func(S) else \"No\")", "print", "\"Yes\" if func(S) else \"No\"", "func(S)", "func", "S", "\"Yes\"", "\"No\"", "S=input()", "input()", "S", "ma={\"N\":0,\"S\":0,\"E\":0,\"W\":0}", "{\"N\":0,\"S\":0,\"E\":0,\"W\":0}", "ma", "def input():\n return sys.stdin.readline().rstrip()", "def input():\n return sys.stdin.readline().rstrip()", "input", "def func(S):\n for x in S:\n ma[x]=1\n if ma[\"N\"]!=ma[\"S\"]:\n return False\n if ma[\"W\"]!=ma[\"E\"]:\n return False\n return True", "def func(S):\n for x in S:\n ma[x]=1\n if ma[\"N\"]!=ma[\"S\"]:\n return False\n if ma[\"W\"]!=ma[\"E\"]:\n return False\n return True", "func" ]
import sys def input(): return sys.stdin.readline().rstrip() ma={"N":0,"S":0,"E":0,"W":0} def func(S): for x in S: ma[x]=1 if ma["N"]!=ma["S"]: return False if ma["W"]!=ma["E"]: return False return True S=input() print("Yes" if func(S) else "No")
[ 7, 15, 13, 0, 13, 18, 18, 18, 13, 13, 13, 13, 0, 13, 18, 18, 18, 13, 13, 13, 13, 0, 13, 18, 18, 18, 13, 13, 13, 13, 4, 18, 13, 13, 2, 17, 17, 0, 13, 4, 13, 17, 0, 13, 4, 13, 0, 13, 4, 13, 13, 14, 2, 2, 17, 13, 2, 17, 13, 14, 40, 2, 2, 17, 13, 2, 17, 13, 4, 13, 17, 4, 13, 14, 2, 2, 17, 13, 2, 17, 13, 14, 40, 2, 2, 17, 13, 2, 17, 13, 4, 13, 17, 4, 13, 4, 13, 17, 10, 4, 13, 10, 18, 13, 10, 4, 13, 10, 18, 13, 10, 4, 13, 10, 18, 13 ]
[ [ 114, 4 ], [ 102, 13 ], [ 108, 22 ], [ 105, 38 ], [ 99, 43 ], [ 111, 47 ], [ 100, 50 ], [ 112, 55 ], [ 112, 58 ], [ 112, 64 ], [ 112, 67 ], [ 112, 77 ], [ 112, 80 ], [ 112, 86 ], [ 112, 89 ], [ 99, 100 ], [ 102, 103 ], [ 105, 106 ], [ 108, 109 ], [ 111, 112 ], [ 114, 115 ] ]
[ "import sys\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\nread = sys.stdin.buffer.read\nsys.setrecursionlimit(10 ** 7)\nINF = float('inf')\n\nS = input()\nsS = set(S)\nif \"N\" in sS or \"S\" in sS:\n if not (\"N\" in sS and \"S\" in sS):\n print('No')\n quit()\nif \"W\" in sS or \"E\" in sS:\n if not (\"W\" in sS and \"E\" in sS):\n print('No')\n quit()\nprint('Yes')", "import sys", "sys", "readline = sys.stdin.buffer.readline", "readline", "sys.stdin.buffer.readline", "sys.stdin.buffer", "sys.stdin", "sys", "stdin", "buffer", "readline", "readlines = sys.stdin.buffer.readlines", "readlines", "sys.stdin.buffer.readlines", "sys.stdin.buffer", "sys.stdin", "sys", "stdin", "buffer", "readlines", "read = sys.stdin.buffer.read", "read", "sys.stdin.buffer.read", "sys.stdin.buffer", "sys.stdin", "sys", "stdin", "buffer", "read", "sys.setrecursionlimit(10 ** 7)", "sys.setrecursionlimit", "sys", "setrecursionlimit", "10 ** 7", "10", "7", "INF = float('inf')", "INF", "float('inf')", "float", "'inf'", "S = input()", "S", "input()", "input", "sS = set(S)", "sS", "set(S)", "set", "S", "if \"N\" in sS or \"S\" in sS:\n if not (\"N\" in sS and \"S\" in sS):\n print('No')\n quit()", "\"N\" in sS or \"S\" in sS", "\"N\" in sS", "\"N\"", "sS", "\"S\" in sS", "\"S\"", "sS", "if not (\"N\" in sS and \"S\" in sS):\n print('No')\n quit()", "not (\"N\" in sS and \"S\" in sS)", "\"N\" in sS and \"S\" in sS", "\"N\" in sS", "\"N\"", "sS", "\"S\" in sS", "\"S\"", "sS", "print('No')", "print", "'No'", "quit()", "quit", "if \"W\" in sS or \"E\" in sS:\n if not (\"W\" in sS and \"E\" in sS):\n print('No')\n quit()", "\"W\" in sS or \"E\" in sS", "\"W\" in sS", "\"W\"", "sS", "\"E\" in sS", "\"E\"", "sS", "if not (\"W\" in sS and \"E\" in sS):\n print('No')\n quit()", "not (\"W\" in sS and \"E\" in sS)", "\"W\" in sS and \"E\" in sS", "\"W\" in sS", "\"W\"", "sS", "\"E\" in sS", "\"E\"", "sS", "print('No')", "print", "'No'", "quit()", "quit", "print('Yes')", "print", "'Yes'", "S = input()", "input()", "S", "readlines = sys.stdin.buffer.readlines", "sys.stdin.buffer.readlines", "readlines", "INF = float('inf')", "float('inf')", "INF", "read = sys.stdin.buffer.read", "sys.stdin.buffer.read", "read", "sS = set(S)", "set(S)", "sS", "readline = sys.stdin.buffer.readline", "sys.stdin.buffer.readline", "readline" ]
import sys readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines read = sys.stdin.buffer.read sys.setrecursionlimit(10 ** 7) INF = float('inf') S = input() sS = set(S) if "N" in sS or "S" in sS: if not ("N" in sS and "S" in sS): print('No') quit() if "W" in sS or "E" in sS: if not ("W" in sS and "E" in sS): print('No') quit() print('Yes')
[ 7, 0, 13, 4, 13, 0, 13, 2, 39, 17, 17, 28, 13, 4, 13, 4, 13, 13, 14, 2, 2, 18, 13, 13, 17, 2, 18, 13, 17, 17, 0, 18, 13, 17, 17, 14, 2, 2, 18, 13, 13, 17, 2, 18, 13, 17, 17, 0, 18, 13, 17, 17, 14, 2, 2, 18, 13, 13, 17, 2, 18, 13, 17, 17, 0, 18, 13, 17, 17, 14, 2, 2, 18, 13, 13, 17, 2, 18, 13, 17, 17, 0, 18, 13, 17, 17, 14, 2, 2, 18, 13, 17, 18, 13, 17, 2, 18, 13, 17, 18, 13, 17, 4, 13, 17, 4, 13, 17, 10, 2, 13, 10, 4, 13 ]
[ [ 112, 2 ], [ 109, 6 ], [ 13, 12 ], [ 113, 17 ], [ 113, 22 ], [ 12, 23 ], [ 110, 27 ], [ 34, 31 ], [ 110, 32 ], [ 113, 39 ], [ 12, 40 ], [ 110, 44 ], [ 51, 48 ], [ 110, 49 ], [ 113, 56 ], [ 12, 57 ], [ 110, 61 ], [ 68, 65 ], [ 110, 66 ], [ 113, 73 ], [ 12, 74 ], [ 110, 78 ], [ 85, 82 ], [ 110, 83 ], [ 110, 90 ], [ 110, 93 ], [ 110, 97 ], [ 110, 100 ], [ 109, 110 ], [ 112, 113 ] ]
[ "s = input()\n\ncheck = [0]*4\n\nfor i in range(len(s)):\n if s[i] == \"N\" and check[0] == 0:\n check[0] = 1\n if s[i] == \"S\" and check[1] == 0:\n check[1] = 1\n if s[i] == \"W\" and check[2] == 0:\n check[2] = 1\n if s[i] == \"E\" and check[3] == 0:\n check[3] = 1\nif check[0] == check[1] and check[2] == check[3]:\n print(\"Yes\")\nelse:\n print(\"No\")", "s = input()", "s", "input()", "input", "check = [0]*4", "check", "[0]*4", "[0]", "0", "4", "for i in range(len(s)):\n if s[i] == \"N\" and check[0] == 0:\n check[0] = 1\n if s[i] == \"S\" and check[1] == 0:\n check[1] = 1\n if s[i] == \"W\" and check[2] == 0:\n check[2] = 1\n if s[i] == \"E\" and check[3] == 0:\n check[3] = 1", "i", "range(len(s))", "range", "len(s)", "len", "s", "if s[i] == \"N\" and check[0] == 0:\n check[0] = 1\n ", "s[i] == \"N\" and check[0] == 0", "s[i] == \"N\"", "s[i]", "s", "i", "\"N\"", "check[0] == 0", "check[0]", "check", "0", "0", "check[0] = 1", "check[0]", "check", "0", "1", "if s[i] == \"S\" and check[1] == 0:\n check[1] = 1\n ", "s[i] == \"S\" and check[1] == 0", "s[i] == \"S\"", "s[i]", "s", "i", "\"S\"", "check[1] == 0", "check[1]", "check", "1", "0", "check[1] = 1", "check[1]", "check", "1", "1", "if s[i] == \"W\" and check[2] == 0:\n check[2] = 1\n ", "s[i] == \"W\" and check[2] == 0", "s[i] == \"W\"", "s[i]", "s", "i", "\"W\"", "check[2] == 0", "check[2]", "check", "2", "0", "check[2] = 1", "check[2]", "check", "2", "1", "if s[i] == \"E\" and check[3] == 0:\n check[3] = 1", "s[i] == \"E\" and check[3] == 0", "s[i] == \"E\"", "s[i]", "s", "i", "\"E\"", "check[3] == 0", "check[3]", "check", "3", "0", "check[3] = 1", "check[3]", "check", "3", "1", "if check[0] == check[1] and check[2] == check[3]:\n print(\"Yes\")\nelse:\n print(\"No\")", "check[0] == check[1] and check[2] == check[3]", "check[0] == check[1]", "check[0]", "check", "0", "check[1]", "check", "1", "check[2] == check[3]", "check[2]", "check", "2", "check[3]", "check", "3", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "check = [0]*4", "[0]*4", "check", "s = input()", "input()", "s" ]
s = input() check = [0]*4 for i in range(len(s)): if s[i] == "N" and check[0] == 0: check[0] = 1 if s[i] == "S" and check[1] == 0: check[1] = 1 if s[i] == "W" and check[2] == 0: check[2] = 1 if s[i] == "E" and check[3] == 0: check[3] = 1 if check[0] == check[1] and check[2] == check[3]: print("Yes") else: print("No")
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 13, 14, 2, 2, 2, 2, 2, 17, 13, 40, 17, 13, 2, 2, 17, 13, 40, 17, 13, 2, 2, 17, 13, 40, 17, 13, 2, 2, 17, 13, 40, 17, 13, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13 ]
[ [ 51, 2 ], [ 54, 8 ], [ 52, 11 ], [ 55, 19 ], [ 55, 22 ], [ 55, 26 ], [ 55, 29 ], [ 55, 33 ], [ 55, 36 ], [ 55, 40 ], [ 55, 43 ], [ 51, 52 ], [ 54, 55 ] ]
[ "s = list(input())\nss = set(s)\nif ((\"W\" in ss and \"E\" not in ss) or (\"S\" in ss and \"N\" not in ss) \n or (\"E\" in ss and \"W\" not in ss) or (\"N\" in ss and \"S\" not in ss)):\n print(\"No\")\nelse:\n print(\"Yes\")", "s = list(input())", "s", "list(input())", "list", "input()", "input", "ss = set(s)", "ss", "set(s)", "set", "s", "if ((\"W\" in ss and \"E\" not in ss) or (\"S\" in ss and \"N\" not in ss) \n or (\"E\" in ss and \"W\" not in ss) or (\"N\" in ss and \"S\" not in ss)):\n print(\"No\")\nelse:\n print(\"Yes\")", "(\"W\" in ss and \"E\" not in ss) or (\"S\" in ss and \"N\" not in ss) \n or (\"E\" in ss and \"W\" not in ss) or (\"N\" in ss and \"S\" not in ss)", "(\"W\" in ss and \"E\" not in ss) or (\"S\" in ss and \"N\" not in ss) \n or (\"E\" in ss and \"W\" not in ss)", "(\"W\" in ss and \"E\" not in ss) or (\"S\" in ss and \"N\" not in ss)", "\"W\" in ss and \"E\" not in ss", "\"W\" in ss", "\"W\"", "ss", "\"E\" not in ss", "\"E\"", "ss", "\"S\" in ss and \"N\" not in ss", "\"S\" in ss", "\"S\"", "ss", "\"N\" not in ss", "\"N\"", "ss", "\"E\" in ss and \"W\" not in ss", "\"E\" in ss", "\"E\"", "ss", "\"W\" not in ss", "\"W\"", "ss", "\"N\" in ss and \"S\" not in ss", "\"N\" in ss", "\"N\"", "ss", "\"S\" not in ss", "\"S\"", "ss", "print(\"No\")", "print", "\"No\"", "print(\"Yes\")", "print", "\"Yes\"", "s = list(input())", "list(input())", "s", "ss = set(s)", "set(s)", "ss" ]
s = list(input()) ss = set(s) if (("W" in ss and "E" not in ss) or ("S" in ss and "N" not in ss) or ("E" in ss and "W" not in ss) or ("N" in ss and "S" not in ss)): print("No") else: print("Yes")
[ 7, 15, 13, 13, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 12, 13, 12, 13, 12, 13, 12, 13, 41, 28, 13, 4, 13, 13, 4, 4, 13, 12, 13, 23, 13, 4, 18, 13, 13, 2, 17, 17, 0, 13, 4, 13, 17, 0, 13, 2, 2, 17, 17, 17, 15, 0, 13, 4, 13, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 14, 2, 2, 2, 13, 13, 17, 2, 17, 2, 13, 13, 4, 13, 17, 14, 2, 2, 17, 2, 13, 13, 2, 2, 13, 13, 17, 4, 13, 17, 14, 2, 2, 17, 2, 13, 13, 2, 17, 2, 13, 13, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 12, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 2, 13, 10, 12, 13, 10, 12, 13, 10, 4, 13, 10, 4, 13, 10, 12, 13, 10, 12, 13 ]
[ [ 26, 25 ], [ 168, 31 ], [ 35, 35 ], [ 146, 44 ], [ 152, 49 ], [ 161, 57 ], [ 171, 59 ], [ 137, 61 ], [ 162, 64 ], [ 149, 68 ], [ 162, 71 ], [ 143, 75 ], [ 162, 78 ], [ 164, 82 ], [ 162, 85 ], [ 138, 92 ], [ 144, 93 ], [ 150, 98 ], [ 165, 99 ], [ 138, 108 ], [ 144, 109 ], [ 150, 112 ], [ 165, 113 ], [ 138, 123 ], [ 144, 124 ], [ 150, 128 ], [ 165, 129 ], [ 137, 138 ], [ 143, 144 ], [ 146, 147 ], [ 149, 150 ], [ 152, 153 ], [ 161, 162 ], [ 164, 165 ] ]
[ "import sys, re\nfrom collections import deque, defaultdict, Counter\nfrom math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees#, log2, log\nfrom itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby\nfrom operator import itemgetter, mul\nfrom copy import deepcopy\nfrom string import ascii_lowercase, ascii_uppercase, digits\nfrom bisect import bisect, bisect_left, insort, insort_left\nfrom fractions import gcd\nfrom heapq import heappush, heappop\nfrom functools import reduce\nfrom decimal import Decimal\ndef input(): return sys.stdin.readline().strip()\ndef INT(): return int(input())\ndef MAP(): return map(int, input().split())\ndef LIST(): return list(map(int, input().split()))\ndef ZIP(n): return zip(*(MAP() for _ in range(n)))\nsys.setrecursionlimit(10 ** 9)\nINF = float('inf')\nmod = 10**9 + 7\nfrom decimal import *\n\nS = input()\n\nn = S.count(\"N\")\nw = S.count(\"W\")\ns = S.count(\"S\")\ne = S.count(\"E\")\n\nif n+s == 0 and 0 < w*e:\n\tprint(\"Yes\")\nelif 0 < n*s and w+e == 0:\n\tprint(\"Yes\")\nelif 0 < n*s and 0< w*e:\n\tprint(\"Yes\")\nelse:\n\tprint(\"No\")", "import sys, re", "sys", "re", "from collections import deque, defaultdict, Counter", "from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees", "from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby", "from operator import itemgetter, mul", "from copy import deepcopy", "from string import ascii_lowercase, ascii_uppercase, digits", "from bisect import bisect, bisect_left, insort, insort_left", "from fractions import gcd", "from heapq import heappush, heappop", "from functools import reduce", "from decimal import Decimal", "def input(): return sys.stdin.readline().strip()", "input", "def INT(): return int(input())", "INT", "def MAP(): return map(int, input().split())", "MAP", "def LIST(): return list(map(int, input().split()))", "LIST", "MAP() for _ in range(n)", "for _ in range(n)", "_", "range(n)", "range", "n", "for _ in range(n)", "MAP()", "MAP", "def ZIP(n): return zip(*(MAP() for _ in range(n)))", "ZIP", "n", "n", "sys.setrecursionlimit(10 ** 9)", "sys.setrecursionlimit", "sys", "setrecursionlimit", "10 ** 9", "10", "9", "INF = float('inf')", "INF", "float('inf')", "float", "'inf'", "mod = 10**9 + 7", "mod", "10**9 + 7", "10**9", "10", "9", "7", "from decimal import *", "S = input()", "S", "input()", "input", "n = S.count(\"N\")", "n", "S.count(\"N\")", "S.count", "S", "count", "\"N\"", "w = S.count(\"W\")", "w", "S.count(\"W\")", "S.count", "S", "count", "\"W\"", "s = S.count(\"S\")", "s", "S.count(\"S\")", "S.count", "S", "count", "\"S\"", "e = S.count(\"E\")", "e", "S.count(\"E\")", "S.count", "S", "count", "\"E\"", "if n+s == 0 and 0 < w*e:\n\tprint(\"Yes\")\nelif 0 < n*s and w+e == 0:\n\tprint(\"Yes\")\nelif 0 < n*s and 0< w*e:\n\tprint(\"Yes\")\nelse:\n\tprint(\"No\")", "n+s == 0 and 0 < w*e", "n+s == 0", "n+s", "n", "s", "0", "0 < w*e", "0", "w*e", "w", "e", "print(\"Yes\")", "print", "\"Yes\"", "elif 0 < n*s and w+e == 0:\n\tprint(\"Yes\")", "0 < n*s and w+e == 0", "0 < n*s", "0", "n*s", "n", "s", "w+e == 0", "w+e", "w", "e", "0", "print(\"Yes\")", "print", "\"Yes\"", "elif 0 < n*s and 0< w*e:\n\tprint(\"Yes\")", "0 < n*s and 0< w*e", "0 < n*s", "0", "n*s", "n", "s", "0< w*e", "0", "w*e", "w", "e", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "n = S.count(\"N\")", "S.count(\"N\")", "n", "def LIST(): return list(map(int, input().split()))", "def LIST(): return list(map(int, input().split()))", "LIST", "s = S.count(\"S\")", "S.count(\"S\")", "s", "INF = float('inf')", "float('inf')", "INF", "w = S.count(\"W\")", "S.count(\"W\")", "w", "mod = 10**9 + 7", "10**9 + 7", "mod", "def INT(): return int(input())", "def INT(): return int(input())", "INT", "def ZIP(n): return zip(*(MAP() for _ in range(n)))", "def ZIP(n): return zip(*(MAP() for _ in range(n)))", "ZIP", "S = input()", "input()", "S", "e = S.count(\"E\")", "S.count(\"E\")", "e", "def MAP(): return map(int, input().split())", "def MAP(): return map(int, input().split())", "MAP", "def input(): return sys.stdin.readline().strip()", "def input(): return sys.stdin.readline().strip()", "input" ]
import sys, re from collections import deque, defaultdict, Counter from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees#, log2, log from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby from operator import itemgetter, mul from copy import deepcopy from string import ascii_lowercase, ascii_uppercase, digits from bisect import bisect, bisect_left, insort, insort_left from fractions import gcd from heapq import heappush, heappop from functools import reduce from decimal import Decimal def input(): return sys.stdin.readline().strip() def INT(): return int(input()) def MAP(): return map(int, input().split()) def LIST(): return list(map(int, input().split())) def ZIP(n): return zip(*(MAP() for _ in range(n))) sys.setrecursionlimit(10 ** 9) INF = float('inf') mod = 10**9 + 7 from decimal import * S = input() n = S.count("N") w = S.count("W") s = S.count("S") e = S.count("E") if n+s == 0 and 0 < w*e: print("Yes") elif 0 < n*s and w+e == 0: print("Yes") elif 0 < n*s and 0< w*e: print("Yes") else: print("No")
[ 7, 0, 13, 4, 13, 14, 2, 2, 2, 17, 13, 2, 17, 13, 2, 2, 17, 13, 2, 17, 13, 4, 13, 17, 4, 13, 17, 10, 4, 13 ]
[ [ 28, 2 ], [ 29, 10 ], [ 29, 13 ], [ 29, 17 ], [ 29, 20 ], [ 28, 29 ] ]
[ "S =input()\nif (('N' in S) == ('S' in S)) and (('W' in S) == ('E' in S)):\n print('Yes')\nelse:\n print('No')", "S =input()", "S", "input()", "input", "if (('N' in S) == ('S' in S)) and (('W' in S) == ('E' in S)):\n print('Yes')\nelse:\n print('No')", "(('N' in S) == ('S' in S)) and (('W' in S) == ('E' in S))", "('N' in S) == ('S' in S)", "'N' in S", "'N'", "S", "'S' in S", "'S'", "S", "('W' in S) == ('E' in S)", "'W' in S", "'W'", "S", "'E' in S", "'E'", "S", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "S =input()", "input()", "S" ]
S =input() if (('N' in S) == ('S' in S)) and (('W' in S) == ('E' in S)): print('Yes') else: print('No')
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 0, 13, 17, 14, 2, 2, 17, 13, 40, 2, 17, 13, 0, 13, 17, 14, 2, 2, 17, 13, 40, 2, 17, 13, 0, 13, 17, 14, 2, 2, 17, 13, 40, 2, 17, 13, 0, 13, 17, 14, 2, 2, 17, 13, 40, 2, 17, 13, 0, 13, 17, 4, 13, 8, 13, 17, 17, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13 ]
[ [ 75, 2 ], [ 87, 8 ], [ 76, 13 ], [ 78, 15 ], [ 88, 21 ], [ 76, 21 ], [ 88, 25 ], [ 76, 25 ], [ 81, 27 ], [ 88, 33 ], [ 76, 33 ], [ 88, 37 ], [ 76, 37 ], [ 84, 39 ], [ 88, 45 ], [ 76, 45 ], [ 88, 49 ], [ 76, 49 ], [ 90, 51 ], [ 88, 57 ], [ 76, 57 ], [ 88, 61 ], [ 76, 61 ], [ 72, 63 ], [ 73, 68 ], [ 91, 68 ], [ 85, 68 ], [ 82, 68 ], [ 79, 68 ], [ 72, 73 ], [ 75, 76 ], [ 78, 79 ], [ 81, 82 ], [ 84, 85 ], [ 87, 88 ], [ 90, 91 ] ]
[ "s = list(input())\ns = list(set(s))\nflag = True\nif \"N\" in s and not \"S\" in s:\n flag = False\nif \"S\" in s and not \"N\" in s:\n flag = False\nif \"E\" in s and not \"W\" in s:\n flag = False\nif \"W\" in s and not \"E\" in s:\n flag = False\nprint(\"Yes\" if flag else \"No\")", "s = list(input())", "s", "list(input())", "list", "input()", "input", "s = list(set(s))", "s", "list(set(s))", "list", "set(s)", "set", "s", "flag = True", "flag", "True", "if \"N\" in s and not \"S\" in s:\n flag = False", "\"N\" in s and not \"S\" in s", "\"N\" in s", "\"N\"", "s", "not \"S\" in s", "\"S\" in s", "\"S\"", "s", "flag = False", "flag", "False", "if \"S\" in s and not \"N\" in s:\n flag = False", "\"S\" in s and not \"N\" in s", "\"S\" in s", "\"S\"", "s", "not \"N\" in s", "\"N\" in s", "\"N\"", "s", "flag = False", "flag", "False", "if \"E\" in s and not \"W\" in s:\n flag = False", "\"E\" in s and not \"W\" in s", "\"E\" in s", "\"E\"", "s", "not \"W\" in s", "\"W\" in s", "\"W\"", "s", "flag = False", "flag", "False", "if \"W\" in s and not \"E\" in s:\n flag = False", "\"W\" in s and not \"E\" in s", "\"W\" in s", "\"W\"", "s", "not \"E\" in s", "\"E\" in s", "\"E\"", "s", "flag = False", "flag", "False", "print(\"Yes\" if flag else \"No\")", "print", "\"Yes\" if flag else \"No\"", "flag", "\"Yes\"", "\"No\"", "flag = False", "False", "flag", "s = list(input())", "list(input())", "s", "flag = True", "True", "flag", "flag = False", "False", "flag", "flag = False", "False", "flag", "s = list(set(s))", "list(set(s))", "s", "flag = False", "False", "flag" ]
s = list(input()) s = list(set(s)) flag = True if "N" in s and not "S" in s: flag = False if "S" in s and not "N" in s: flag = False if "E" in s and not "W" in s: flag = False if "W" in s and not "E" in s: flag = False print("Yes" if flag else "No")
[ 7, 0, 13, 4, 13, 14, 2, 17, 13, 14, 40, 17, 13, 4, 13, 17, 4, 13, 14, 2, 17, 13, 14, 40, 17, 13, 4, 13, 17, 4, 13, 14, 2, 17, 13, 14, 40, 17, 13, 4, 13, 17, 4, 13, 14, 2, 17, 13, 14, 40, 17, 13, 4, 13, 17, 4, 13, 4, 13, 17, 10, 4, 13 ]
[ [ 61, 2 ], [ 62, 8 ], [ 62, 12 ], [ 62, 21 ], [ 62, 25 ], [ 62, 34 ], [ 62, 38 ], [ 62, 47 ], [ 62, 51 ], [ 61, 62 ] ]
[ "s = input()\nif \"N\" in s:\n if \"S\" not in s :\n print(\"No\")\n exit()\nif \"E\" in s:\n if \"W\" not in s:\n print(\"No\")\n exit()\nif \"S\" in s:\n if \"N\" not in s :\n print(\"No\")\n exit()\nif \"W\" in s:\n if \"E\" not in s:\n print(\"No\")\n exit()\nprint(\"Yes\")", "s = input()", "s", "input()", "input", "if \"N\" in s:\n if \"S\" not in s :\n print(\"No\")\n exit()", "\"N\" in s", "\"N\"", "s", "if \"S\" not in s :\n print(\"No\")\n exit()", "\"S\" not in s", "\"S\"", "s", "print(\"No\")", "print", "\"No\"", "exit()", "exit", "if \"E\" in s:\n if \"W\" not in s:\n print(\"No\")\n exit()", "\"E\" in s", "\"E\"", "s", "if \"W\" not in s:\n print(\"No\")\n exit()", "\"W\" not in s", "\"W\"", "s", "print(\"No\")", "print", "\"No\"", "exit()", "exit", "if \"S\" in s:\n if \"N\" not in s :\n print(\"No\")\n exit()", "\"S\" in s", "\"S\"", "s", "if \"N\" not in s :\n print(\"No\")\n exit()", "\"N\" not in s", "\"N\"", "s", "print(\"No\")", "print", "\"No\"", "exit()", "exit", "if \"W\" in s:\n if \"E\" not in s:\n print(\"No\")\n exit()", "\"W\" in s", "\"W\"", "s", "if \"E\" not in s:\n print(\"No\")\n exit()", "\"E\" not in s", "\"E\"", "s", "print(\"No\")", "print", "\"No\"", "exit()", "exit", "print(\"Yes\")", "print", "\"Yes\"", "s = input()", "input()", "s" ]
s = input() if "N" in s: if "S" not in s : print("No") exit() if "E" in s: if "W" not in s: print("No") exit() if "S" in s: if "N" not in s : print("No") exit() if "W" in s: if "E" not in s: print("No") exit() print("Yes")
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 39, 4, 18, 13, 13, 17, 4, 18, 13, 13, 17, 13, 0, 13, 4, 13, 39, 4, 18, 13, 13, 17, 4, 18, 13, 13, 17, 13, 0, 13, 39, 17, 17, 0, 13, 17, 14, 2, 2, 13, 13, 2, 2, 13, 13, 17, 0, 13, 17, 0, 13, 17, 14, 2, 2, 13, 13, 2, 2, 13, 13, 17, 0, 13, 17, 0, 13, 17, 4, 13, 18, 13, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 39, 13 ]
[ [ 86, 2 ], [ 92, 6 ], [ 87, 12 ], [ 87, 17 ], [ 92, 20 ], [ 101, 22 ], [ 87, 28 ], [ 87, 33 ], [ 101, 36 ], [ 113, 38 ], [ 107, 43 ], [ 84, 48 ], [ 93, 49 ], [ 84, 52 ], [ 93, 53 ], [ 95, 56 ], [ 104, 59 ], [ 90, 64 ], [ 102, 65 ], [ 90, 68 ], [ 102, 69 ], [ 110, 72 ], [ 98, 75 ], [ 114, 80 ], [ 99, 81 ], [ 111, 81 ], [ 105, 81 ], [ 96, 81 ], [ 108, 81 ], [ 92, 84 ], [ 86, 87 ], [ 101, 90 ], [ 92, 93 ], [ 95, 96 ], [ 98, 99 ], [ 101, 102 ], [ 104, 105 ], [ 107, 108 ], [ 110, 111 ], [ 113, 114 ] ]
[ "s = input()\nkita, minami = sorted([s.count('N'),s.count('S')])\nnisi, higasi = sorted([s.count('W'),s.count('E')])\nresult = ['No','Yes']\nr = 1\nif kita==minami or kita*minami > 0:\n r *= 1\nelse:\n r = 0\n\nif nisi==higasi or nisi*higasi > 0:\n r *= 1\nelse:\n r = 0\nprint(result[r])", "s = input()", "s", "input()", "input", "kita, minami = sorted([s.count('N'),s.count('S')])", "kita", "sorted([s.count('N'),s.count('S')])", "sorted", "[s.count('N'),s.count('S')]", "s.count('N')", "s.count", "s", "count", "'N'", "s.count('S')", "s.count", "s", "count", "'S'", "minami", "nisi, higasi = sorted([s.count('W'),s.count('E')])", "nisi", "sorted([s.count('W'),s.count('E')])", "sorted", "[s.count('W'),s.count('E')]", "s.count('W')", "s.count", "s", "count", "'W'", "s.count('E')", "s.count", "s", "count", "'E'", "higasi", "result = ['No','Yes']", "result", "['No','Yes']", "'No'", "'Yes'", "r = 1", "r", "1", "if kita==minami or kita*minami > 0:\n r *= 1\nelse:\n r = 0", "kita==minami or kita*minami > 0", "kita==minami", "kita", "minami", "kita*minami > 0", "kita*minami", "kita", "minami", "0", "r *= 1", "r", "1", "r = 0", "r", "0", "if nisi==higasi or nisi*higasi > 0:\n r *= 1\nelse:\n r = 0", "nisi==higasi or nisi*higasi > 0", "nisi==higasi", "nisi", "higasi", "nisi*higasi > 0", "nisi*higasi", "nisi", "higasi", "0", "r *= 1", "r", "1", "r = 0", "r", "0", "print(result[r])", "print", "result[r]", "result", "r", "kita, minami = sorted([s.count('N'),s.count('S')])", "sorted([s.count('N'),s.count('S')])", "kita", "s = input()", "input()", "s", "nisi, higasi = sorted([s.count('W'),s.count('E')])", "sorted([s.count('W'),s.count('E')])", "nisi", "minami = sorted([s.count('N'),s.count('S')])", "sorted([s.count('N'),s.count('S')])", "minami", "r *= 1", "1", "r", "r = 0", "0", "r", "higasi = sorted([s.count('W'),s.count('E')])", "sorted([s.count('W'),s.count('E')])", "higasi", "r = 0", "0", "r", "r = 1", "1", "r", "r *= 1", "1", "r", "result = ['No','Yes']", "['No','Yes']", "result" ]
s = input() kita, minami = sorted([s.count('N'),s.count('S')]) nisi, higasi = sorted([s.count('W'),s.count('E')]) result = ['No','Yes'] r = 1 if kita==minami or kita*minami > 0: r *= 1 else: r = 0 if nisi==higasi or nisi*higasi > 0: r *= 1 else: r = 0 print(result[r])
[ 7, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 0, 13, 4, 13, 4, 13, 13, 28, 13, 4, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 0, 13, 17, 14, 2, 18, 13, 13, 17, 0, 13, 17, 14, 2, 18, 13, 13, 17, 0, 13, 17, 0, 13, 17, 4, 13, 8, 2, 2, 13, 17, 2, 13, 17, 17, 17, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 83, 2 ], [ 86, 6 ], [ 77, 9 ], [ 68, 12 ], [ 84, 17 ], [ 20, 19 ], [ 69, 24 ], [ 84, 24 ], [ 69, 28 ], [ 84, 28 ], [ 19, 29 ], [ 89, 32 ], [ 69, 37 ], [ 84, 37 ], [ 19, 38 ], [ 74, 41 ], [ 69, 46 ], [ 84, 46 ], [ 19, 47 ], [ 80, 50 ], [ 71, 53 ], [ 72, 60 ], [ 75, 60 ], [ 87, 60 ], [ 81, 63 ], [ 90, 63 ], [ 78, 63 ], [ 68, 69 ], [ 71, 72 ], [ 74, 75 ], [ 77, 78 ], [ 80, 81 ], [ 83, 84 ], [ 86, 87 ], [ 89, 90 ] ]
[ "s = input()\nx = 0\ny = 0\ns = list(set(s))\nfor i in range(len(s)):\n if s[i] == 'N':\n y += 1\n elif s[i] == 'W':\n x -= 1\n elif s[i] == 'S':\n y -= 1\n else:\n x += 1\nprint('Yes' if x == 0 and y == 0 else 'No')", "s = input()", "s", "input()", "input", "x = 0", "x", "0", "y = 0", "y", "0", "s = list(set(s))", "s", "list(set(s))", "list", "set(s)", "set", "s", "for i in range(len(s)):\n if s[i] == 'N':\n y += 1\n elif s[i] == 'W':\n x -= 1\n elif s[i] == 'S':\n y -= 1\n else:\n x += 1", "i", "range(len(s))", "range", "len(s)", "len", "s", "if s[i] == 'N':\n y += 1\n elif s[i] == 'W':\n x -= 1\n elif s[i] == 'S':\n y -= 1\n else:\n x += 1", "s[i] == 'N'", "s[i]", "s", "i", "'N'", "y += 1", "y", "1", "elif s[i] == 'W':\n x -= 1\n ", "s[i] == 'W'", "s[i]", "s", "i", "'W'", "x -= 1", "x", "1", "elif s[i] == 'S':\n y -= 1\n ", "s[i] == 'S'", "s[i]", "s", "i", "'S'", "y -= 1", "y", "1", "x += 1", "x", "1", "print('Yes' if x == 0 and y == 0 else 'No')", "print", "'Yes' if x == 0 and y == 0 else 'No'", "x == 0 and y == 0", "x == 0", "x", "0", "y == 0", "y", "0", "'Yes'", "'No'", "s = list(set(s))", "list(set(s))", "s", "x += 1", "1", "x", "x -= 1", "1", "x", "y = 0", "0", "y", "y -= 1", "1", "y", "s = input()", "input()", "s", "x = 0", "0", "x", "y += 1", "1", "y" ]
s = input() x = 0 y = 0 s = list(set(s)) for i in range(len(s)): if s[i] == 'N': y += 1 elif s[i] == 'W': x -= 1 elif s[i] == 'S': y -= 1 else: x += 1 print('Yes' if x == 0 and y == 0 else 'No')
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 17, 42, 2, 13, 17, 14, 2, 17, 13, 14, 2, 17, 13, 0, 13, 17, 4, 13, 17, 3, 14, 2, 17, 13, 14, 2, 17, 13, 0, 13, 17, 4, 13, 17, 3, 14, 2, 17, 13, 14, 2, 17, 13, 0, 13, 17, 4, 13, 17, 3, 14, 2, 17, 13, 14, 2, 17, 13, 0, 13, 17, 4, 13, 17, 3, 4, 13, 17, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 84, 2 ], [ 87, 6 ], [ 85, 9 ], [ 93, 11 ], [ 94, 15 ], [ 82, 15 ], [ 91, 15 ], [ 100, 15 ], [ 97, 15 ], [ 88, 20 ], [ 85, 20 ], [ 88, 24 ], [ 85, 24 ], [ 96, 26 ], [ 88, 35 ], [ 85, 35 ], [ 88, 39 ], [ 85, 39 ], [ 99, 41 ], [ 88, 50 ], [ 85, 50 ], [ 88, 54 ], [ 85, 54 ], [ 90, 56 ], [ 88, 65 ], [ 85, 65 ], [ 88, 69 ], [ 85, 69 ], [ 81, 71 ], [ 81, 82 ], [ 84, 85 ], [ 87, 88 ], [ 90, 91 ], [ 93, 94 ], [ 96, 97 ], [ 99, 100 ] ]
[ "S = input()\nS = list(S)\ncount = 0\nwhile count == 0:\n if 'N' in S:\n if'S' in S:\n count += 1\n else:\n print('No')\n break\n if 'S' in S:\n if'N' in S:\n count += 1\n else:\n print('No')\n break\n if 'E' in S:\n if'W' in S:\n count += 1\n else:\n print('No')\n break\n if 'W' in S:\n if'E' in S:\n count += 1 \n else:\n print('No')\n break\nelse:\n print('Yes')", "S = input()", "S", "input()", "input", "S = list(S)", "S", "list(S)", "list", "S", "count = 0", "count", "0", "while count == 0:\n if 'N' in S:\n if'S' in S:\n count += 1\n else:\n print('No')\n break\n if 'S' in S:\n if'N' in S:\n count += 1\n else:\n print('No')\n break\n if 'E' in S:\n if'W' in S:\n count += 1\n else:\n print('No')\n break\n if 'W' in S:\n if'E' in S:\n count += 1 \n else:\n print('No')\n break\nelse:\n print('Yes')", "count == 0", "count", "0", "if 'N' in S:\n if'S' in S:\n count += 1\n else:\n print('No')\n break\n ", "'N' in S", "'N'", "S", "if'S' in S:\n count += 1\n else:\n print('No')\n break\n ", "'S' in S", "'S'", "S", "count += 1", "count", "1", "print('No')", "print", "'No'", "break", "if 'S' in S:\n if'N' in S:\n count += 1\n else:\n print('No')\n break\n ", "'S' in S", "'S'", "S", "if'N' in S:\n count += 1\n else:\n print('No')\n break\n ", "'N' in S", "'N'", "S", "count += 1", "count", "1", "print('No')", "print", "'No'", "break", "if 'E' in S:\n if'W' in S:\n count += 1\n else:\n print('No')\n break\n ", "'E' in S", "'E'", "S", "if'W' in S:\n count += 1\n else:\n print('No')\n break\n ", "'W' in S", "'W'", "S", "count += 1", "count", "1", "print('No')", "print", "'No'", "break", "if 'W' in S:\n if'E' in S:\n count += 1 \n else:\n print('No')\n break", "'W' in S", "'W'", "S", "if'E' in S:\n count += 1 \n else:\n print('No')\n break", "'E' in S", "'E'", "S", "count += 1", "count", "1", "print('No')", "print", "'No'", "break", "print('Yes')", "print", "'Yes'", "count += 1", "1", "count", "S = input()", "input()", "S", "S = list(S)", "list(S)", "S", "count += 1", "1", "count", "count = 0", "0", "count", "count += 1", "1", "count", "count += 1", "1", "count" ]
S = input() S = list(S) count = 0 while count == 0: if 'N' in S: if'S' in S: count += 1 else: print('No') break if 'S' in S: if'N' in S: count += 1 else: print('No') break if 'E' in S: if'W' in S: count += 1 else: print('No') break if 'W' in S: if'E' in S: count += 1 else: print('No') break else: print('Yes')
[ 7, 15, 13, 0, 13, 18, 18, 13, 13, 13, 4, 18, 13, 13, 2, 17, 17, 0, 13, 4, 18, 4, 13, 13, 14, 2, 2, 2, 17, 13, 40, 17, 13, 2, 40, 17, 13, 2, 17, 13, 4, 13, 17, 4, 18, 13, 13, 17, 14, 2, 2, 2, 17, 13, 40, 17, 13, 2, 40, 17, 13, 2, 17, 13, 4, 13, 17, 4, 18, 13, 13, 17, 4, 13, 17, 10, 4, 13, 10, 18, 13 ]
[ [ 79, 4 ], [ 76, 18 ], [ 80, 22 ], [ 77, 29 ], [ 77, 32 ], [ 77, 36 ], [ 77, 39 ], [ 77, 53 ], [ 77, 56 ], [ 77, 60 ], [ 77, 63 ], [ 76, 77 ], [ 79, 80 ] ]
[ "import sys\ninput = sys.stdin.readline\nsys.setrecursionlimit(10 ** 7)\n\ns = input().strip()\n\nif ('N' in s and 'S' not in s) or ('N' not in s and 'S' in s):\n print('No')\n sys.exit(0)\nif ('W' in s and 'E' not in s) or ('W' not in s and 'E' in s):\n print('No')\n sys.exit(0)\nprint('Yes')", "import sys", "sys", "input = sys.stdin.readline", "input", "sys.stdin.readline", "sys.stdin", "sys", "stdin", "readline", "sys.setrecursionlimit(10 ** 7)", "sys.setrecursionlimit", "sys", "setrecursionlimit", "10 ** 7", "10", "7", "s = input().strip()", "s", "input().strip()", "().strip", "()", "input", "strip", "if ('N' in s and 'S' not in s) or ('N' not in s and 'S' in s):\n print('No')\n sys.exit(0)", "('N' in s and 'S' not in s) or ('N' not in s and 'S' in s)", "'N' in s and 'S' not in s", "'N' in s", "'N'", "s", "'S' not in s", "'S'", "s", "'N' not in s and 'S' in s", "'N' not in s", "'N'", "s", "'S' in s", "'S'", "s", "print('No')", "print", "'No'", "sys.exit(0)", "sys.exit", "sys", "exit", "0", "if ('W' in s and 'E' not in s) or ('W' not in s and 'E' in s):\n print('No')\n sys.exit(0)", "('W' in s and 'E' not in s) or ('W' not in s and 'E' in s)", "'W' in s and 'E' not in s", "'W' in s", "'W'", "s", "'E' not in s", "'E'", "s", "'W' not in s and 'E' in s", "'W' not in s", "'W'", "s", "'E' in s", "'E'", "s", "print('No')", "print", "'No'", "sys.exit(0)", "sys.exit", "sys", "exit", "0", "print('Yes')", "print", "'Yes'", "s = input().strip()", "input().strip()", "s", "input = sys.stdin.readline", "sys.stdin.readline", "input" ]
import sys input = sys.stdin.readline sys.setrecursionlimit(10 ** 7) s = input().strip() if ('N' in s and 'S' not in s) or ('N' not in s and 'S' in s): print('No') sys.exit(0) if ('W' in s and 'E' not in s) or ('W' not in s and 'E' in s): print('No') sys.exit(0) print('Yes')
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 14, 2, 2, 17, 13, 2, 17, 13, 14, 2, 2, 17, 13, 2, 17, 13, 4, 13, 17, 14, 2, 2, 17, 13, 2, 17, 13, 4, 13, 17, 4, 13, 17, 14, 2, 2, 17, 13, 2, 17, 13, 4, 13, 17, 14, 2, 2, 17, 13, 2, 17, 13, 4, 13, 17, 14, 2, 2, 17, 13, 2, 17, 13, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13 ]
[ [ 83, 2 ], [ 80, 6 ], [ 84, 9 ], [ 81, 14 ], [ 81, 17 ], [ 81, 22 ], [ 81, 25 ], [ 81, 33 ], [ 81, 36 ], [ 81, 47 ], [ 81, 50 ], [ 81, 58 ], [ 81, 61 ], [ 81, 69 ], [ 81, 72 ], [ 80, 81 ], [ 83, 84 ] ]
[ "#!/usr/bin/env python\n# coding: utf-8\n\n# In[7]:\n\n\nS = input()\n\n\n# In[8]:\n\n\ns_set = set(S)\nif \"S\" in s_set and \"N\" in s_set:\n if \"E\" in s_set and \"W\" in s_set:\n print(\"Yes\")\n elif \"E\" in s_set or \"W\" in s_set:\n print(\"No\")\n else:\n print(\"Yes\")\nelif \"S\" in s_set or \"N\" in s_set:\n print(\"No\")\nelse:\n if \"E\" in s_set and \"W\" in s_set:\n print(\"Yes\")\n elif \"E\" in s_set or \"W\" in s_set:\n print(\"No\")\n else:\n print(\"Yes\")\n\n\n# In[ ]:\n\n\n\n", "S = input()", "S", "input()", "input", "s_set = set(S)", "s_set", "set(S)", "set", "S", "if \"S\" in s_set and \"N\" in s_set:\n if \"E\" in s_set and \"W\" in s_set:\n print(\"Yes\")\n elif \"E\" in s_set or \"W\" in s_set:\n print(\"No\")\n else:\n print(\"Yes\")\nelif \"S\" in s_set or \"N\" in s_set:\n print(\"No\")\nelse:\n if \"E\" in s_set and \"W\" in s_set:\n print(\"Yes\")\n elif \"E\" in s_set or \"W\" in s_set:\n print(\"No\")\n else:\n print(\"Yes\")\n\n\n# In[ ]:", "\"S\" in s_set and \"N\" in s_set", "\"S\" in s_set", "\"S\"", "s_set", "\"N\" in s_set", "\"N\"", "s_set", "if \"E\" in s_set and \"W\" in s_set:\n print(\"Yes\")\n elif \"E\" in s_set or \"W\" in s_set:\n print(\"No\")\n else:\n print(\"Yes\")", "\"E\" in s_set and \"W\" in s_set", "\"E\" in s_set", "\"E\"", "s_set", "\"W\" in s_set", "\"W\"", "s_set", "print(\"Yes\")", "print", "\"Yes\"", "elif \"E\" in s_set or \"W\" in s_set:\n print(\"No\")\n ", "\"E\" in s_set or \"W\" in s_set", "\"E\" in s_set", "\"E\"", "s_set", "\"W\" in s_set", "\"W\"", "s_set", "print(\"No\")", "print", "\"No\"", "print(\"Yes\")", "print", "\"Yes\"", "elif \"S\" in s_set or \"N\" in s_set:\n print(\"No\")", "\"S\" in s_set or \"N\" in s_set", "\"S\" in s_set", "\"S\"", "s_set", "\"N\" in s_set", "\"N\"", "s_set", "print(\"No\")", "print", "\"No\"", "if \"E\" in s_set and \"W\" in s_set:\n print(\"Yes\")\n elif \"E\" in s_set or \"W\" in s_set:\n print(\"No\")\n else:\n print(\"Yes\")\n\n\n# In[ ]:", "\"E\" in s_set and \"W\" in s_set", "\"E\" in s_set", "\"E\"", "s_set", "\"W\" in s_set", "\"W\"", "s_set", "print(\"Yes\")", "print", "\"Yes\"", "elif \"E\" in s_set or \"W\" in s_set:\n print(\"No\")\n ", "\"E\" in s_set or \"W\" in s_set", "\"E\" in s_set", "\"E\"", "s_set", "\"W\" in s_set", "\"W\"", "s_set", "print(\"No\")", "print", "\"No\"", "print(\"Yes\")", "print", "\"Yes\"", "s_set = set(S)", "set(S)", "s_set", "S = input()", "input()", "S" ]
#!/usr/bin/env python # coding: utf-8 # In[7]: S = input() # In[8]: s_set = set(S) if "S" in s_set and "N" in s_set: if "E" in s_set and "W" in s_set: print("Yes") elif "E" in s_set or "W" in s_set: print("No") else: print("Yes") elif "S" in s_set or "N" in s_set: print("No") else: if "E" in s_set and "W" in s_set: print("Yes") elif "E" in s_set or "W" in s_set: print("No") else: print("Yes") # In[ ]:
[ 7, 12, 13, 29, 4, 18, 13, 13, 13, 23, 13, 23, 13, 0, 13, 4, 13, 0, 13, 4, 13, 13, 17, 13, 4, 13, 13, 17, 13, 4, 13, 13, 17, 13, 4, 13, 13, 17, 14, 2, 2, 2, 13, 17, 2, 13, 17, 2, 2, 13, 17, 2, 13, 17, 4, 13, 17, 14, 2, 2, 2, 13, 17, 2, 13, 17, 2, 2, 13, 17, 2, 13, 17, 4, 13, 17, 4, 13, 17, 10, 12, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 10, 6 ], [ 12, 8 ], [ 10, 10 ], [ 12, 12 ], [ 89, 14 ], [ 95, 18 ], [ 81, 20 ], [ 90, 21 ], [ 86, 23 ], [ 81, 25 ], [ 90, 26 ], [ 92, 28 ], [ 81, 30 ], [ 90, 31 ], [ 83, 33 ], [ 81, 35 ], [ 90, 36 ], [ 96, 42 ], [ 93, 45 ], [ 93, 49 ], [ 96, 52 ], [ 87, 61 ], [ 84, 64 ], [ 84, 68 ], [ 87, 71 ], [ 83, 84 ], [ 86, 87 ], [ 89, 90 ], [ 92, 93 ], [ 95, 96 ] ]
[ "def c(S, a):\n return S.count(a)\n\n\nS = input()\nn, w, s, e = c(S, 'N'), c(S, 'W'), c(S, 'S'), c(S, 'E')\nif ((n > 0 and s == 0) or (s > 0 and n == 0)):\n print('No')\nelif ((w > 0 and e == 0) or (e > 0 and w == 0)):\n print('No')\nelse:\n print('Yes')", "def c(S, a):\n return S.count(a)", "c", "return S.count(a)", "S.count(a)", "S.count", "S", "count", "a", "S", "S", "a", "a", "S = input()", "S", "input()", "input", "n, w, s, e = c(S, 'N'), c(S, 'W'), c(S, 'S'), c(S, 'E')", "n", "c(S, 'N')", "c", "S", "'N'", "w", "c(S, 'W')", "c", "S", "'W'", "s", "c(S, 'S')", "c", "S", "'S'", "e", "c(S, 'E')", "c", "S", "'E'", "if ((n > 0 and s == 0) or (s > 0 and n == 0)):\n print('No')\nelif ((w > 0 and e == 0) or (e > 0 and w == 0)):\n print('No')\nelse:\n print('Yes')", "(n > 0 and s == 0) or (s > 0 and n == 0)", "n > 0 and s == 0", "n > 0", "n", "0", "s == 0", "s", "0", "s > 0 and n == 0", "s > 0", "s", "0", "n == 0", "n", "0", "print('No')", "print", "'No'", "elif ((w > 0 and e == 0) or (e > 0 and w == 0)):\n print('No')", "(w > 0 and e == 0) or (e > 0 and w == 0)", "w > 0 and e == 0", "w > 0", "w", "0", "e == 0", "e", "0", "e > 0 and w == 0", "e > 0", "e", "0", "w == 0", "w", "0", "print('No')", "print", "'No'", "print('Yes')", "print", "'Yes'", "def c(S, a):\n return S.count(a)", "def c(S, a):\n return S.count(a)", "c", "e = c(S, 'N'), c(S, 'W'), c(S, 'S'), c(S, 'E')", "c(S, 'E')", "e", "w, s, e = c(S, 'N'), c(S, 'W'), c(S, 'S'), c(S, 'E')", "c(S, 'W')", "w", "S = input()", "input()", "S", "s, e = c(S, 'N'), c(S, 'W'), c(S, 'S'), c(S, 'E')", "c(S, 'S')", "s", "n, w, s, e = c(S, 'N'), c(S, 'W'), c(S, 'S'), c(S, 'E')", "c(S, 'N')", "n" ]
def c(S, a): return S.count(a) S = input() n, w, s, e = c(S, 'N'), c(S, 'W'), c(S, 'S'), c(S, 'E') if ((n > 0 and s == 0) or (s > 0 and n == 0)): print('No') elif ((w > 0 and e == 0) or (e > 0 and w == 0)): print('No') else: print('Yes')
[ 7, 15, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 17, 14, 2, 18, 13, 17, 17, 14, 2, 18, 13, 17, 17, 0, 13, 17, 14, 2, 18, 13, 17, 17, 14, 2, 18, 13, 17, 17, 0, 13, 17, 14, 2, 18, 13, 17, 17, 14, 2, 18, 13, 17, 17, 0, 13, 17, 14, 2, 18, 13, 17, 17, 14, 2, 18, 13, 17, 17, 0, 13, 17, 8, 2, 13, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 87, 3 ], [ 90, 9 ], [ 88, 12 ], [ 99, 14 ], [ 91, 19 ], [ 91, 25 ], [ 93, 29 ], [ 91, 34 ], [ 91, 40 ], [ 96, 44 ], [ 91, 49 ], [ 91, 55 ], [ 102, 59 ], [ 91, 64 ], [ 91, 70 ], [ 105, 74 ], [ 106, 78 ], [ 103, 78 ], [ 97, 78 ], [ 94, 78 ], [ 100, 78 ], [ 87, 88 ], [ 90, 91 ], [ 93, 94 ], [ 96, 97 ], [ 99, 100 ], [ 102, 103 ], [ 105, 106 ] ]
[ "# A\nfrom collections import Counter\nS = list(input())\ncount = Counter(S)\nflag = True\n\nif count['N'] > 0:\n if count['S'] == 0:\n flag = False\nif count['S'] > 0:\n if count['N'] == 0:\n flag = False\nif count['E'] > 0:\n if count['W'] == 0:\n flag = False\nif count['W'] > 0:\n if count['E'] == 0:\n flag = False\nprint(\"Yes\") if flag == True else print(\"No\")", "from collections import Counter", "S = list(input())", "S", "list(input())", "list", "input()", "input", "count = Counter(S)", "count", "Counter(S)", "Counter", "S", "flag = True", "flag", "True", "if count['N'] > 0:\n if count['S'] == 0:\n flag = False", "count['N'] > 0", "count['N']", "count", "'N'", "0", "if count['S'] == 0:\n flag = False", "count['S'] == 0", "count['S']", "count", "'S'", "0", "flag = False", "flag", "False", "if count['S'] > 0:\n if count['N'] == 0:\n flag = False", "count['S'] > 0", "count['S']", "count", "'S'", "0", "if count['N'] == 0:\n flag = False", "count['N'] == 0", "count['N']", "count", "'N'", "0", "flag = False", "flag", "False", "if count['E'] > 0:\n if count['W'] == 0:\n flag = False", "count['E'] > 0", "count['E']", "count", "'E'", "0", "if count['W'] == 0:\n flag = False", "count['W'] == 0", "count['W']", "count", "'W'", "0", "flag = False", "flag", "False", "if count['W'] > 0:\n if count['E'] == 0:\n flag = False", "count['W'] > 0", "count['W']", "count", "'W'", "0", "if count['E'] == 0:\n flag = False", "count['E'] == 0", "count['E']", "count", "'E'", "0", "flag = False", "flag", "False", "print(\"Yes\") if flag == True else print(\"No\")", "flag == True", "flag", "True", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "S = list(input())", "list(input())", "S", "count = Counter(S)", "Counter(S)", "count", "flag = False", "False", "flag", "flag = False", "False", "flag", "flag = True", "True", "flag", "flag = False", "False", "flag", "flag = False", "False", "flag" ]
# A from collections import Counter S = list(input()) count = Counter(S) flag = True if count['N'] > 0: if count['S'] == 0: flag = False if count['S'] > 0: if count['N'] == 0: flag = False if count['E'] > 0: if count['W'] == 0: flag = False if count['W'] > 0: if count['E'] == 0: flag = False print("Yes") if flag == True else print("No")
[ 7, 15, 13, 12, 13, 12, 13, 4, 18, 13, 13, 2, 17, 17, 0, 13, 4, 13, 4, 13, 15, 0, 13, 4, 13, 13, 14, 2, 2, 2, 2, 2, 18, 13, 17, 17, 40, 18, 13, 17, 17, 2, 40, 18, 13, 17, 17, 2, 18, 13, 17, 17, 2, 2, 18, 13, 17, 17, 40, 18, 13, 17, 17, 2, 40, 18, 13, 17, 17, 2, 18, 13, 17, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 12, 13, 10, 12, 13, 10, 4, 13 ]
[ [ 90, 15 ], [ 85, 19 ], [ 81, 22 ], [ 91, 25 ], [ 82, 33 ], [ 82, 38 ], [ 82, 44 ], [ 82, 49 ], [ 82, 55 ], [ 82, 60 ], [ 82, 66 ], [ 82, 71 ], [ 81, 82 ], [ 90, 91 ] ]
[ "import sys\ndef input(): return sys.stdin.readline().strip()\ndef mapint(): return map(int, input().split())\nsys.setrecursionlimit(10**9)\n\nS = list(input())\nfrom collections import Counter\nc = Counter(S)\n\nif (c['N']==0 and c['S']!=0) or (c['N']!=0 and c['S']==0) or (c['E']==0 and c['W']!=0) or (c['E']!=0 and c['W']==0):\n print('No')\nelse:\n print('Yes')", "import sys", "sys", "def input(): return sys.stdin.readline().strip()", "input", "def mapint(): return map(int, input().split())", "mapint", "sys.setrecursionlimit(10**9)", "sys.setrecursionlimit", "sys", "setrecursionlimit", "10**9", "10", "9", "S = list(input())", "S", "list(input())", "list", "input()", "input", "from collections import Counter", "c = Counter(S)", "c", "Counter(S)", "Counter", "S", "if (c['N']==0 and c['S']!=0) or (c['N']!=0 and c['S']==0) or (c['E']==0 and c['W']!=0) or (c['E']!=0 and c['W']==0):\n print('No')\nelse:\n print('Yes')", "(c['N']==0 and c['S']!=0) or (c['N']!=0 and c['S']==0) or (c['E']==0 and c['W']!=0) or (c['E']!=0 and c['W']==0)", "(c['N']==0 and c['S']!=0) or (c['N']!=0 and c['S']==0) or (c['E']==0 and c['W']!=0)", "(c['N']==0 and c['S']!=0) or (c['N']!=0 and c['S']==0)", "c['N']==0 and c['S']!=0", "c['N']==0", "c['N']", "c", "'N'", "0", "c['S']!=0", "c['S']", "c", "'S'", "0", "c['N']!=0 and c['S']==0", "c['N']!=0", "c['N']", "c", "'N'", "0", "c['S']==0", "c['S']", "c", "'S'", "0", "c['E']==0 and c['W']!=0", "c['E']==0", "c['E']", "c", "'E'", "0", "c['W']!=0", "c['W']", "c", "'W'", "0", "c['E']!=0 and c['W']==0", "c['E']!=0", "c['E']", "c", "'E'", "0", "c['W']==0", "c['W']", "c", "'W'", "0", "print('No')", "print", "'No'", "print('Yes')", "print", "'Yes'", "c = Counter(S)", "Counter(S)", "c", "def input(): return sys.stdin.readline().strip()", "def input(): return sys.stdin.readline().strip()", "input", "def mapint(): return map(int, input().split())", "def mapint(): return map(int, input().split())", "mapint", "S = list(input())", "list(input())", "S" ]
import sys def input(): return sys.stdin.readline().strip() def mapint(): return map(int, input().split()) sys.setrecursionlimit(10**9) S = list(input()) from collections import Counter c = Counter(S) if (c['N']==0 and c['S']!=0) or (c['N']!=0 and c['S']==0) or (c['E']==0 and c['W']!=0) or (c['E']!=0 and c['W']==0): print('No') else: print('Yes')
[ 7, 0, 13, 4, 13, 0, 13, 2, 39, 17, 17, 0, 13, 4, 13, 13, 0, 13, 17, 0, 13, 39, 17, 17, 17, 17, 28, 13, 4, 13, 13, 0, 13, 18, 13, 13, 0, 18, 13, 4, 18, 13, 13, 13, 17, 14, 40, 2, 18, 13, 17, 18, 13, 17, 14, 40, 2, 18, 13, 17, 18, 13, 17, 0, 13, 17, 0, 13, 17, 0, 13, 17, 0, 13, 17, 14, 13, 4, 13, 17, 4, 13, 17, 10, 39, 13, 10, 18, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 2, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13 ]
[ [ 108, 2 ], [ 99, 6 ], [ 105, 12 ], [ 109, 15 ], [ 93, 17 ], [ 84, 20 ], [ 28, 27 ], [ 106, 30 ], [ 87, 32 ], [ 109, 34 ], [ 27, 35 ], [ 44, 37 ], [ 100, 38 ], [ 85, 41 ], [ 88, 43 ], [ 100, 49 ], [ 100, 52 ], [ 100, 58 ], [ 100, 61 ], [ 111, 64 ], [ 96, 67 ], [ 90, 70 ], [ 102, 73 ], [ 84, 85 ], [ 87, 88 ], [ 90, 91 ], [ 93, 94 ], [ 96, 97 ], [ 99, 100 ], [ 102, 103 ], [ 105, 106 ], [ 108, 109 ], [ 111, 112 ] ]
[ "# coding: utf-8\n# Your code here!\n#a, b = map(int,input().split())\nS = input()\nF = [False] * 4\nn = len(S)\nflg = False\nV = [\"E\", \"W\", \"N\", \"S\"]\nfor i in range(n):\n s = S[i]\n F[V.index(s)] = True\n\nif not (F[0]^F[1]):\n if not (F[2]^F[3]):\n flg = True\na = True\nb= False\nc=False\nif flg:\n print(\"Yes\")\nelse:\n print(\"No\")\n\n#print(a^b, b^c)", "S = input()", "S", "input()", "input", "F = [False] * 4", "F", "[False] * 4", "[False]", "False", "4", "n = len(S)", "n", "len(S)", "len", "S", "flg = False", "flg", "False", "V = [\"E\", \"W\", \"N\", \"S\"]", "V", "[\"E\", \"W\", \"N\", \"S\"]", "\"E\"", "\"W\"", "\"N\"", "\"S\"", "for i in range(n):\n s = S[i]\n F[V.index(s)] = True", "i", "range(n)", "range", "n", "s = S[i]", "s", "S[i]", "S", "i", "F[V.index(s)] = True", "F[V.index(s)]", "F", "V.index(s)", "V.index", "V", "index", "s", "True", "if not (F[0]^F[1]):\n if not (F[2]^F[3]):\n flg = True", "not (F[0]^F[1])", "F[0]^F[1]", "F[0]", "F", "0", "F[1]", "F", "1", "if not (F[2]^F[3]):\n flg = True", "not (F[2]^F[3])", "F[2]^F[3]", "F[2]", "F", "2", "F[3]", "F", "3", "flg = True", "flg", "True", "a = True", "a", "True", "b= False", "b", "False", "c=False", "c", "False", "if flg:\n print(\"Yes\")\nelse:\n print(\"No\")\n\n#print(a^b, b^c)", "flg", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "V = [\"E\", \"W\", \"N\", \"S\"]", "[\"E\", \"W\", \"N\", \"S\"]", "V", "s = S[i]", "S[i]", "s", "b= False", "False", "b", "flg = False", "False", "flg", "a = True", "True", "a", "F = [False] * 4", "[False] * 4", "F", "c=False", "False", "c", "n = len(S)", "len(S)", "n", "S = input()", "input()", "S", "flg = True", "True", "flg" ]
# coding: utf-8 # Your code here! #a, b = map(int,input().split()) S = input() F = [False] * 4 n = len(S) flg = False V = ["E", "W", "N", "S"] for i in range(n): s = S[i] F[V.index(s)] = True if not (F[0]^F[1]): if not (F[2]^F[3]): flg = True a = True b= False c=False if flg: print("Yes") else: print("No") #print(a^b, b^c)
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 14, 2, 2, 4, 13, 13, 17, 2, 4, 13, 13, 17, 4, 13, 17, 14, 2, 2, 40, 17, 13, 40, 17, 13, 2, 40, 17, 13, 40, 17, 13, 4, 13, 17, 14, 2, 2, 2, 2, 17, 13, 2, 17, 13, 2, 17, 13, 2, 17, 13, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13 ]
[ [ 70, 2 ], [ 67, 6 ], [ 71, 9 ], [ 71, 15 ], [ 68, 20 ], [ 71, 30 ], [ 71, 33 ], [ 71, 37 ], [ 71, 40 ], [ 71, 50 ], [ 71, 53 ], [ 71, 56 ], [ 71, 59 ], [ 67, 68 ], [ 70, 71 ] ]
[ "N = input()\nNS = set(N)\nif len(N) == 1 or len(NS) == 1:\n print(\"No\")\nelif \"N\" not in N and \"S\" not in N or \"W\" not in N and \"E\" not in N :\n print(\"Yes\")\nelif \"N\" in N and \"W\" in N and \"E\" in N and \"S\" in N:\n print(\"Yes\")\nelse:\n print(\"No\")", "N = input()", "N", "input()", "input", "NS = set(N)", "NS", "set(N)", "set", "N", "if len(N) == 1 or len(NS) == 1:\n print(\"No\")\nelif \"N\" not in N and \"S\" not in N or \"W\" not in N and \"E\" not in N :\n print(\"Yes\")\nelif \"N\" in N and \"W\" in N and \"E\" in N and \"S\" in N:\n print(\"Yes\")\nelse:\n print(\"No\")", "len(N) == 1 or len(NS) == 1", "len(N) == 1", "len(N)", "len", "N", "1", "len(NS) == 1", "len(NS)", "len", "NS", "1", "print(\"No\")", "print", "\"No\"", "elif \"N\" not in N and \"S\" not in N or \"W\" not in N and \"E\" not in N :\n print(\"Yes\")", "\"N\" not in N and \"S\" not in N or \"W\" not in N and \"E\" not in N", "\"N\" not in N and \"S\" not in N", "\"N\" not in N", "\"N\"", "N", "\"S\" not in N", "\"S\"", "N", "\"W\" not in N and \"E\" not in N", "\"W\" not in N", "\"W\"", "N", "\"E\" not in N", "\"E\"", "N", "print(\"Yes\")", "print", "\"Yes\"", "elif \"N\" in N and \"W\" in N and \"E\" in N and \"S\" in N:\n print(\"Yes\")", "\"N\" in N and \"W\" in N and \"E\" in N and \"S\" in N", "\"N\" in N and \"W\" in N and \"E\" in N", "\"N\" in N and \"W\" in N", "\"N\" in N", "\"N\"", "N", "\"W\" in N", "\"W\"", "N", "\"E\" in N", "\"E\"", "N", "\"S\" in N", "\"S\"", "N", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "NS = set(N)", "set(N)", "NS", "N = input()", "input()", "N" ]
N = input() NS = set(N) if len(N) == 1 or len(NS) == 1: print("No") elif "N" not in N and "S" not in N or "W" not in N and "E" not in N : print("Yes") elif "N" in N and "W" in N and "E" in N and "S" in N: print("Yes") else: print("No")
[ 7, 0, 13, 4, 13, 14, 2, 2, 2, 17, 13, 2, 17, 13, 2, 2, 17, 13, 2, 17, 13, 4, 13, 17, 14, 2, 2, 2, 17, 13, 2, 17, 13, 2, 40, 2, 17, 13, 40, 2, 17, 13, 4, 13, 17, 14, 2, 2, 40, 2, 17, 13, 40, 2, 17, 13, 2, 2, 17, 13, 2, 17, 13, 4, 13, 17, 4, 13, 17, 10, 4, 13 ]
[ [ 70, 2 ], [ 71, 10 ], [ 71, 13 ], [ 71, 17 ], [ 71, 20 ], [ 71, 29 ], [ 71, 32 ], [ 71, 37 ], [ 71, 41 ], [ 71, 51 ], [ 71, 55 ], [ 71, 59 ], [ 71, 62 ], [ 70, 71 ] ]
[ "s = input()\n\nif (\"N\" in s and \"S\" in s) and (\"W\" in s and \"E\" in s):\n print (\"Yes\")\nelif (\"N\" in s and \"S\" in s) and (not \"W\" in s and not \"E\" in s):\n print (\"Yes\")\nelif (not \"N\" in s and not \"S\" in s) and (\"W\" in s and \"E\" in s):\n print (\"Yes\")\nelse:\n print (\"No\")", "s = input()", "s", "input()", "input", "if (\"N\" in s and \"S\" in s) and (\"W\" in s and \"E\" in s):\n print (\"Yes\")\nelif (\"N\" in s and \"S\" in s) and (not \"W\" in s and not \"E\" in s):\n print (\"Yes\")\nelif (not \"N\" in s and not \"S\" in s) and (\"W\" in s and \"E\" in s):\n print (\"Yes\")\nelse:\n print (\"No\")", "(\"N\" in s and \"S\" in s) and (\"W\" in s and \"E\" in s)", "\"N\" in s and \"S\" in s", "\"N\" in s", "\"N\"", "s", "\"S\" in s", "\"S\"", "s", "\"W\" in s and \"E\" in s", "\"W\" in s", "\"W\"", "s", "\"E\" in s", "\"E\"", "s", "print (\"Yes\")", "print", "\"Yes\"", "elif (\"N\" in s and \"S\" in s) and (not \"W\" in s and not \"E\" in s):\n print (\"Yes\")", "(\"N\" in s and \"S\" in s) and (not \"W\" in s and not \"E\" in s)", "\"N\" in s and \"S\" in s", "\"N\" in s", "\"N\"", "s", "\"S\" in s", "\"S\"", "s", "not \"W\" in s and not \"E\" in s", "not \"W\" in s", "\"W\" in s", "\"W\"", "s", "not \"E\" in s", "\"E\" in s", "\"E\"", "s", "print (\"Yes\")", "print", "\"Yes\"", "elif (not \"N\" in s and not \"S\" in s) and (\"W\" in s and \"E\" in s):\n print (\"Yes\")", "(not \"N\" in s and not \"S\" in s) and (\"W\" in s and \"E\" in s)", "not \"N\" in s and not \"S\" in s", "not \"N\" in s", "\"N\" in s", "\"N\"", "s", "not \"S\" in s", "\"S\" in s", "\"S\"", "s", "\"W\" in s and \"E\" in s", "\"W\" in s", "\"W\"", "s", "\"E\" in s", "\"E\"", "s", "print (\"Yes\")", "print", "\"Yes\"", "print (\"No\")", "print", "\"No\"", "s = input()", "input()", "s" ]
s = input() if ("N" in s and "S" in s) and ("W" in s and "E" in s): print ("Yes") elif ("N" in s and "S" in s) and (not "W" in s and not "E" in s): print ("Yes") elif (not "N" in s and not "S" in s) and ("W" in s and "E" in s): print ("Yes") else: print ("No")
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 17, 14, 2, 17, 13, 14, 40, 2, 17, 13, 0, 13, 17, 14, 2, 17, 13, 14, 40, 2, 17, 13, 0, 13, 17, 14, 2, 17, 13, 14, 40, 2, 17, 13, 0, 13, 17, 14, 2, 17, 13, 14, 40, 2, 17, 13, 0, 13, 17, 14, 13, 4, 13, 17, 4, 13, 17, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 70, 2 ], [ 73, 8 ], [ 71, 13 ], [ 71, 18 ], [ 76, 20 ], [ 71, 25 ], [ 71, 30 ], [ 82, 32 ], [ 71, 37 ], [ 71, 42 ], [ 79, 44 ], [ 71, 49 ], [ 71, 54 ], [ 67, 56 ], [ 67, 68 ], [ 70, 71 ], [ 73, 74 ], [ 76, 77 ], [ 79, 80 ], [ 82, 83 ] ]
[ "S = list(input())\nflag = 1\nif \"S\" in S:\n if not(\"N\" in S):\n flag = 0\nif \"N\" in S:\n if not(\"S\" in S):\n flag = 0\nif \"E\" in S:\n if not(\"W\" in S):\n flag = 0\nif \"W\" in S:\n if not(\"E\" in S):\n flag = 0\nif flag:\n print(\"Yes\")\nelse:\n print(\"No\")", "S = list(input())", "S", "list(input())", "list", "input()", "input", "flag = 1", "flag", "1", "if \"S\" in S:\n if not(\"N\" in S):\n flag = 0", "\"S\" in S", "\"S\"", "S", "if not(\"N\" in S):\n flag = 0", "not(\"N\" in S)", "\"N\" in S", "\"N\"", "S", "flag = 0", "flag", "0", "if \"N\" in S:\n if not(\"S\" in S):\n flag = 0", "\"N\" in S", "\"N\"", "S", "if not(\"S\" in S):\n flag = 0", "not(\"S\" in S)", "\"S\" in S", "\"S\"", "S", "flag = 0", "flag", "0", "if \"E\" in S:\n if not(\"W\" in S):\n flag = 0", "\"E\" in S", "\"E\"", "S", "if not(\"W\" in S):\n flag = 0", "not(\"W\" in S)", "\"W\" in S", "\"W\"", "S", "flag = 0", "flag", "0", "if \"W\" in S:\n if not(\"E\" in S):\n flag = 0", "\"W\" in S", "\"W\"", "S", "if not(\"E\" in S):\n flag = 0", "not(\"E\" in S)", "\"E\" in S", "\"E\"", "S", "flag = 0", "flag", "0", "if flag:\n print(\"Yes\")\nelse:\n print(\"No\")", "flag", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "flag = 0", "0", "flag", "S = list(input())", "list(input())", "S", "flag = 1", "1", "flag", "flag = 0", "0", "flag", "flag = 0", "0", "flag", "flag = 0", "0", "flag" ]
S = list(input()) flag = 1 if "S" in S: if not("N" in S): flag = 0 if "N" in S: if not("S" in S): flag = 0 if "E" in S: if not("W" in S): flag = 0 if "W" in S: if not("E" in S): flag = 0 if flag: print("Yes") else: print("No")
[ 7, 0, 13, 4, 13, 4, 13, 14, 2, 2, 2, 2, 2, 17, 13, 40, 17, 13, 2, 2, 17, 13, 40, 17, 13, 2, 2, 17, 13, 40, 17, 13, 2, 2, 17, 13, 40, 17, 13, 4, 13, 17, 4, 13, 17, 10, 4, 13 ]
[ [ 46, 2 ], [ 47, 14 ], [ 47, 17 ], [ 47, 21 ], [ 47, 24 ], [ 47, 28 ], [ 47, 31 ], [ 47, 35 ], [ 47, 38 ], [ 46, 47 ] ]
[ "S=list(input())\nif ('N' in S and 'S' not in S) or ('S' in S and 'N' not in S) or ('W' in S and 'E' not in S) or ('E' in S and 'W' not in S):\n print('No') \nelse:\n print('Yes')", "S=list(input())", "S", "list(input())", "list", "input()", "input", "if ('N' in S and 'S' not in S) or ('S' in S and 'N' not in S) or ('W' in S and 'E' not in S) or ('E' in S and 'W' not in S):\n print('No') \nelse:\n print('Yes')", "('N' in S and 'S' not in S) or ('S' in S and 'N' not in S) or ('W' in S and 'E' not in S) or ('E' in S and 'W' not in S)", "('N' in S and 'S' not in S) or ('S' in S and 'N' not in S) or ('W' in S and 'E' not in S)", "('N' in S and 'S' not in S) or ('S' in S and 'N' not in S)", "'N' in S and 'S' not in S", "'N' in S", "'N'", "S", "'S' not in S", "'S'", "S", "'S' in S and 'N' not in S", "'S' in S", "'S'", "S", "'N' not in S", "'N'", "S", "'W' in S and 'E' not in S", "'W' in S", "'W'", "S", "'E' not in S", "'E'", "S", "'E' in S and 'W' not in S", "'E' in S", "'E'", "S", "'W' not in S", "'W'", "S", "print('No')", "print", "'No'", "print('Yes')", "print", "'Yes'", "S=list(input())", "list(input())", "S" ]
S=list(input()) if ('N' in S and 'S' not in S) or ('S' in S and 'N' not in S) or ('W' in S and 'E' not in S) or ('E' in S and 'W' not in S): print('No') else: print('Yes')
[ 7, 0, 13, 4, 13, 41, 28, 13, 17, 4, 13, 17, 0, 13, 13, 28, 13, 13, 0, 18, 13, 13, 17, 14, 2, 2, 2, 18, 13, 17, 17, 40, 18, 13, 17, 17, 2, 40, 18, 13, 17, 17, 2, 18, 13, 17, 17, 4, 13, 17, 14, 2, 2, 2, 18, 13, 17, 17, 40, 18, 13, 17, 17, 2, 40, 18, 13, 17, 17, 2, 18, 13, 17, 17, 4, 13, 17, 4, 13, 17, 10, 13, 13, 10, 4, 13 ]
[ [ 84, 2 ], [ 8, 7 ], [ 7, 10 ], [ 81, 13 ], [ 17, 16 ], [ 85, 16 ], [ 22, 19 ], [ 82, 20 ], [ 16, 21 ], [ 82, 28 ], [ 82, 33 ], [ 82, 39 ], [ 82, 44 ], [ 82, 55 ], [ 82, 60 ], [ 82, 66 ], [ 82, 71 ], [ 81, 82 ], [ 84, 85 ] ]
[ "S = input()\ncount = {s: 0 for s in \"NWSE\"}\nfor s in S:\n count[s] += 1\n\nif count[\"N\"] == 0 and count[\"S\"] >= 1 or count[\"N\"] >= 1 and count[\"S\"] == 0:\n print(\"No\")\nelif count[\"E\"] == 0 and count[\"W\"] >= 1 or count[\"E\"] >= 1 and count[\"W\"] == 0:\n print(\"No\")\nelse:\n print(\"Yes\")", "S = input()", "S", "input()", "input", "s: 0 for s in \"NWSE\"", "for s in \"NWSE\"", "s", "\"NWSE\"", "for s in \"NWSE\"", "s", "0", "count = {s: 0 for s in \"NWSE\"}", "count", "{s: 0 for s in \"NWSE\"}", "for s in S:\n count[s] += 1", "s", "S", "count[s] += 1", "count[s]", "count", "s", "1", "if count[\"N\"] == 0 and count[\"S\"] >= 1 or count[\"N\"] >= 1 and count[\"S\"] == 0:\n print(\"No\")\nelif count[\"E\"] == 0 and count[\"W\"] >= 1 or count[\"E\"] >= 1 and count[\"W\"] == 0:\n print(\"No\")\nelse:\n print(\"Yes\")", "count[\"N\"] == 0 and count[\"S\"] >= 1 or count[\"N\"] >= 1 and count[\"S\"] == 0", "count[\"N\"] == 0 and count[\"S\"] >= 1", "count[\"N\"] == 0", "count[\"N\"]", "count", "\"N\"", "0", "count[\"S\"] >= 1", "count[\"S\"]", "count", "\"S\"", "1", "count[\"N\"] >= 1 and count[\"S\"] == 0", "count[\"N\"] >= 1", "count[\"N\"]", "count", "\"N\"", "1", "count[\"S\"] == 0", "count[\"S\"]", "count", "\"S\"", "0", "print(\"No\")", "print", "\"No\"", "elif count[\"E\"] == 0 and count[\"W\"] >= 1 or count[\"E\"] >= 1 and count[\"W\"] == 0:\n print(\"No\")", "count[\"E\"] == 0 and count[\"W\"] >= 1 or count[\"E\"] >= 1 and count[\"W\"] == 0", "count[\"E\"] == 0 and count[\"W\"] >= 1", "count[\"E\"] == 0", "count[\"E\"]", "count", "\"E\"", "0", "count[\"W\"] >= 1", "count[\"W\"]", "count", "\"W\"", "1", "count[\"E\"] >= 1 and count[\"W\"] == 0", "count[\"E\"] >= 1", "count[\"E\"]", "count", "\"E\"", "1", "count[\"W\"] == 0", "count[\"W\"]", "count", "\"W\"", "0", "print(\"No\")", "print", "\"No\"", "print(\"Yes\")", "print", "\"Yes\"", "count = {s: 0 for s in \"NWSE\"}", "{s: 0 for s in \"NWSE\"}", "count", "S = input()", "input()", "S" ]
S = input() count = {s: 0 for s in "NWSE"} for s in S: count[s] += 1 if count["N"] == 0 and count["S"] >= 1 or count["N"] >= 1 and count["S"] == 0: print("No") elif count["E"] == 0 and count["W"] >= 1 or count["E"] >= 1 and count["W"] == 0: print("No") else: print("Yes")
[ 7, 0, 13, 4, 13, 0, 13, 17, 14, 2, 2, 17, 13, 40, 17, 13, 0, 13, 17, 14, 2, 2, 17, 13, 40, 17, 13, 0, 13, 17, 14, 2, 2, 17, 13, 40, 17, 13, 0, 13, 17, 14, 2, 2, 17, 13, 40, 17, 13, 0, 13, 17, 4, 13, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 56, 2 ], [ 65, 6 ], [ 57, 12 ], [ 57, 15 ], [ 68, 17 ], [ 57, 23 ], [ 57, 26 ], [ 71, 28 ], [ 57, 34 ], [ 57, 37 ], [ 59, 39 ], [ 57, 45 ], [ 57, 48 ], [ 62, 50 ], [ 63, 54 ], [ 60, 54 ], [ 72, 54 ], [ 69, 54 ], [ 66, 54 ], [ 56, 57 ], [ 59, 60 ], [ 62, 63 ], [ 65, 66 ], [ 68, 69 ], [ 71, 72 ] ]
[ "s = input()\nanswer = \"Yes\"\nif \"N\" in s and \"S\" not in s:\n\tanswer = \"No\"\nelif \"S\" in s and \"N\" not in s:\n\tanswer = \"No\"\nelif \"W\" in s and \"E\" not in s:\n\tanswer = \"No\"\nelif \"E\" in s and \"W\" not in s:\n\tanswer = \"No\"\nprint(answer)", "s = input()", "s", "input()", "input", "answer = \"Yes\"", "answer", "\"Yes\"", "if \"N\" in s and \"S\" not in s:\n\tanswer = \"No\"\nelif \"S\" in s and \"N\" not in s:\n\tanswer = \"No\"\nelif \"W\" in s and \"E\" not in s:\n\tanswer = \"No\"\nelif \"E\" in s and \"W\" not in s:\n\tanswer = \"No\"", "\"N\" in s and \"S\" not in s", "\"N\" in s", "\"N\"", "s", "\"S\" not in s", "\"S\"", "s", "answer = \"No\"", "answer", "\"No\"", "elif \"S\" in s and \"N\" not in s:\n\tanswer = \"No\"", "\"S\" in s and \"N\" not in s", "\"S\" in s", "\"S\"", "s", "\"N\" not in s", "\"N\"", "s", "answer = \"No\"", "answer", "\"No\"", "elif \"W\" in s and \"E\" not in s:\n\tanswer = \"No\"", "\"W\" in s and \"E\" not in s", "\"W\" in s", "\"W\"", "s", "\"E\" not in s", "\"E\"", "s", "answer = \"No\"", "answer", "\"No\"", "elif \"E\" in s and \"W\" not in s:\n\tanswer = \"No\"", "\"E\" in s and \"W\" not in s", "\"E\" in s", "\"E\"", "s", "\"W\" not in s", "\"W\"", "s", "answer = \"No\"", "answer", "\"No\"", "print(answer)", "print", "answer", "s = input()", "input()", "s", "answer = \"No\"", "\"No\"", "answer", "answer = \"No\"", "\"No\"", "answer", "answer = \"Yes\"", "\"Yes\"", "answer", "answer = \"No\"", "\"No\"", "answer", "answer = \"No\"", "\"No\"", "answer" ]
s = input() answer = "Yes" if "N" in s and "S" not in s: answer = "No" elif "S" in s and "N" not in s: answer = "No" elif "W" in s and "E" not in s: answer = "No" elif "E" in s and "W" not in s: answer = "No" print(answer)
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 4, 13, 13, 0, 18, 13, 18, 13, 13, 17, 14, 2, 2, 2, 2, 2, 18, 13, 17, 17, 40, 18, 13, 17, 17, 2, 40, 18, 13, 17, 17, 2, 18, 13, 17, 17, 2, 2, 18, 13, 17, 17, 40, 18, 13, 17, 17, 2, 2, 18, 13, 17, 17, 40, 18, 13, 17, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13 ]
[ [ 93, 2 ], [ 90, 6 ], [ 11, 10 ], [ 14, 13 ], [ 17, 16 ], [ 20, 19 ], [ 23, 22 ], [ 94, 27 ], [ 34, 29 ], [ 91, 30 ], [ 94, 32 ], [ 22, 33 ], [ 91, 42 ], [ 91, 47 ], [ 91, 53 ], [ 91, 58 ], [ 91, 64 ], [ 91, 69 ], [ 91, 75 ], [ 91, 80 ], [ 90, 91 ], [ 93, 94 ] ]
[ "# https://atcoder.jp/contests/agc003/tasks/agc003_a\n\ns = input()\nd = dict(N=0, W=0, S=0, E=0)\n\nfor i in range(len(s)):\n d[s[i]] += 1\n\nif (d['N'] == 0 and d['S'] != 0) or (d['N'] != 0 and d['S'] == 0) or (d['W'] == 0 and d['E'] != 0) or (d['E'] == 0 and d['W'] != 0):\n print('No')\nelse:\n print('Yes')", "s = input()", "s", "input()", "input", "d = dict(N=0, W=0, S=0, E=0)", "d", "dict(N=0, W=0, S=0, E=0)", "dict", "N=0", "N", "0", "W=0", "W", "0", "S=0", "S", "0", "E=0", "E", "0", "for i in range(len(s)):\n d[s[i]] += 1", "i", "range(len(s))", "range", "len(s)", "len", "s", "d[s[i]] += 1", "d[s[i]]", "d", "s[i]", "s", "i", "1", "if (d['N'] == 0 and d['S'] != 0) or (d['N'] != 0 and d['S'] == 0) or (d['W'] == 0 and d['E'] != 0) or (d['E'] == 0 and d['W'] != 0):\n print('No')\nelse:\n print('Yes')", "(d['N'] == 0 and d['S'] != 0) or (d['N'] != 0 and d['S'] == 0) or (d['W'] == 0 and d['E'] != 0) or (d['E'] == 0 and d['W'] != 0)", "(d['N'] == 0 and d['S'] != 0) or (d['N'] != 0 and d['S'] == 0) or (d['W'] == 0 and d['E'] != 0)", "(d['N'] == 0 and d['S'] != 0) or (d['N'] != 0 and d['S'] == 0)", "d['N'] == 0 and d['S'] != 0", "d['N'] == 0", "d['N']", "d", "'N'", "0", "d['S'] != 0", "d['S']", "d", "'S'", "0", "d['N'] != 0 and d['S'] == 0", "d['N'] != 0", "d['N']", "d", "'N'", "0", "d['S'] == 0", "d['S']", "d", "'S'", "0", "d['W'] == 0 and d['E'] != 0", "d['W'] == 0", "d['W']", "d", "'W'", "0", "d['E'] != 0", "d['E']", "d", "'E'", "0", "d['E'] == 0 and d['W'] != 0", "d['E'] == 0", "d['E']", "d", "'E'", "0", "d['W'] != 0", "d['W']", "d", "'W'", "0", "print('No')", "print", "'No'", "print('Yes')", "print", "'Yes'", "d = dict(N=0, W=0, S=0, E=0)", "dict(N=0, W=0, S=0, E=0)", "d", "s = input()", "input()", "s" ]
# https://atcoder.jp/contests/agc003/tasks/agc003_a s = input() d = dict(N=0, W=0, S=0, E=0) for i in range(len(s)): d[s[i]] += 1 if (d['N'] == 0 and d['S'] != 0) or (d['N'] != 0 and d['S'] == 0) or (d['W'] == 0 and d['E'] != 0) or (d['E'] == 0 and d['W'] != 0): print('No') else: print('Yes')
[ 7, 0, 13, 4, 13, 4, 13, 14, 2, 2, 40, 4, 18, 13, 13, 17, 17, 40, 4, 18, 13, 13, 17, 17, 2, 2, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 14, 2, 2, 40, 4, 18, 13, 13, 17, 17, 40, 4, 18, 13, 13, 17, 17, 2, 2, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 4, 13, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13 ]
[ [ 81, 2 ], [ 82, 13 ], [ 82, 20 ], [ 82, 28 ], [ 82, 35 ], [ 82, 45 ], [ 82, 52 ], [ 82, 60 ], [ 82, 67 ], [ 81, 82 ] ]
[ "S = str(input())\n\nif (S.count(\"N\") !=0 and S.count(\"S\") !=0) or (S.count(\"N\") ==0 and S.count(\"S\") ==0):\n if (S.count(\"W\") !=0 and S.count(\"E\") !=0) or (S.count(\"W\") ==0 and S.count(\"E\") ==0):\n print(\"Yes\")\n else:\n print(\"No\")\nelse:\n print(\"No\")", "S = str(input())", "S", "str(input())", "str", "input()", "input", "if (S.count(\"N\") !=0 and S.count(\"S\") !=0) or (S.count(\"N\") ==0 and S.count(\"S\") ==0):\n if (S.count(\"W\") !=0 and S.count(\"E\") !=0) or (S.count(\"W\") ==0 and S.count(\"E\") ==0):\n print(\"Yes\")\n else:\n print(\"No\")\nelse:\n print(\"No\")", "(S.count(\"N\") !=0 and S.count(\"S\") !=0) or (S.count(\"N\") ==0 and S.count(\"S\") ==0)", "S.count(\"N\") !=0 and S.count(\"S\") !=0", "S.count(\"N\") !=0", "S.count(\"N\")", "S.count", "S", "count", "\"N\"", "0", "S.count(\"S\") !=0", "S.count(\"S\")", "S.count", "S", "count", "\"S\"", "0", "S.count(\"N\") ==0 and S.count(\"S\") ==0", "S.count(\"N\") ==0", "S.count(\"N\")", "S.count", "S", "count", "\"N\"", "0", "S.count(\"S\") ==0", "S.count(\"S\")", "S.count", "S", "count", "\"S\"", "0", "if (S.count(\"W\") !=0 and S.count(\"E\") !=0) or (S.count(\"W\") ==0 and S.count(\"E\") ==0):\n print(\"Yes\")\n else:\n print(\"No\")", "(S.count(\"W\") !=0 and S.count(\"E\") !=0) or (S.count(\"W\") ==0 and S.count(\"E\") ==0)", "S.count(\"W\") !=0 and S.count(\"E\") !=0", "S.count(\"W\") !=0", "S.count(\"W\")", "S.count", "S", "count", "\"W\"", "0", "S.count(\"E\") !=0", "S.count(\"E\")", "S.count", "S", "count", "\"E\"", "0", "S.count(\"W\") ==0 and S.count(\"E\") ==0", "S.count(\"W\") ==0", "S.count(\"W\")", "S.count", "S", "count", "\"W\"", "0", "S.count(\"E\") ==0", "S.count(\"E\")", "S.count", "S", "count", "\"E\"", "0", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "print(\"No\")", "print", "\"No\"", "S = str(input())", "str(input())", "S" ]
S = str(input()) if (S.count("N") !=0 and S.count("S") !=0) or (S.count("N") ==0 and S.count("S") ==0): if (S.count("W") !=0 and S.count("E") !=0) or (S.count("W") ==0 and S.count("E") ==0): print("Yes") else: print("No") else: print("No")
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 28, 13, 13, 4, 18, 13, 13, 13, 14, 2, 2, 2, 2, 17, 13, 2, 17, 13, 2, 17, 13, 2, 17, 13, 4, 13, 17, 14, 2, 2, 2, 40, 2, 17, 13, 40, 2, 17, 13, 2, 17, 13, 2, 17, 13, 4, 13, 17, 14, 2, 2, 2, 2, 17, 13, 2, 17, 13, 40, 2, 17, 13, 40, 2, 17, 13, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13 ]
[ [ 84, 2 ], [ 87, 8 ], [ 13, 12 ], [ 85, 12 ], [ 88, 16 ], [ 12, 18 ], [ 88, 25 ], [ 88, 28 ], [ 88, 31 ], [ 88, 34 ], [ 88, 45 ], [ 88, 49 ], [ 88, 52 ], [ 88, 55 ], [ 88, 65 ], [ 88, 68 ], [ 88, 72 ], [ 88, 76 ], [ 84, 85 ], [ 87, 88 ] ]
[ "S = list(input())\ndir_set = set()\nfor s in S:\n dir_set.add(s)\n\nif 'N' in dir_set and 'S' in dir_set and 'W' in dir_set and 'E' in dir_set:\n ### \"NSFW\" 全部ある場合 \n print(\"Yes\")\nelif not 'N' in dir_set and not 'S' in dir_set and 'W' in dir_set and 'E' in dir_set:\n ### \"NS\" はなく \"EW\" が両方ある場合\n print(\"Yes\")\nelif 'N' in dir_set and 'S' in dir_set and not 'W' in dir_set and not 'E' in dir_set:\n ### \"NS\" が両方あり \"EW\" がない場合\n print(\"Yes\")\nelse:\n ### 上記以外\n print(\"No\")", "S = list(input())", "S", "list(input())", "list", "input()", "input", "dir_set = set()", "dir_set", "set()", "set", "for s in S:\n dir_set.add(s)", "s", "S", "dir_set.add(s)", "dir_set.add", "dir_set", "add", "s", "if 'N' in dir_set and 'S' in dir_set and 'W' in dir_set and 'E' in dir_set:\n ### \"NSFW\" 全部ある場合 \n print(\"Yes\")\nelif not 'N' in dir_set and not 'S' in dir_set and 'W' in dir_set and 'E' in dir_set:\n ### \"NS\" はなく \"EW\" が両方ある場合\n print(\"Yes\")\nelif 'N' in dir_set and 'S' in dir_set and not 'W' in dir_set and not 'E' in dir_set:\n ### \"NS\" が両方あり \"EW\" がない場合\n print(\"Yes\")\nelse:\n ### 上記以外\n print(\"No\")", "'N' in dir_set and 'S' in dir_set and 'W' in dir_set and 'E' in dir_set", "'N' in dir_set and 'S' in dir_set and 'W' in dir_set", "'N' in dir_set and 'S' in dir_set", "'N' in dir_set", "'N'", "dir_set", "'S' in dir_set", "'S'", "dir_set", "'W' in dir_set", "'W'", "dir_set", "'E' in dir_set", "'E'", "dir_set", "print(\"Yes\")", "print", "\"Yes\"", "elif not 'N' in dir_set and not 'S' in dir_set and 'W' in dir_set and 'E' in dir_set:\n ### \"NS\" はなく \"EW\" が両方ある場合\n print(\"Yes\")", "not 'N' in dir_set and not 'S' in dir_set and 'W' in dir_set and 'E' in dir_set", "not 'N' in dir_set and not 'S' in dir_set and 'W' in dir_set", "not 'N' in dir_set and not 'S' in dir_set", "not 'N' in dir_set", "'N' in dir_set", "'N'", "dir_set", "not 'S' in dir_set", "'S' in dir_set", "'S'", "dir_set", "'W' in dir_set", "'W'", "dir_set", "'E' in dir_set", "'E'", "dir_set", "print(\"Yes\")", "print", "\"Yes\"", "elif 'N' in dir_set and 'S' in dir_set and not 'W' in dir_set and not 'E' in dir_set:\n ### \"NS\" が両方あり \"EW\" がない場合\n print(\"Yes\")", "'N' in dir_set and 'S' in dir_set and not 'W' in dir_set and not 'E' in dir_set", "'N' in dir_set and 'S' in dir_set and not 'W' in dir_set", "'N' in dir_set and 'S' in dir_set", "'N' in dir_set", "'N'", "dir_set", "'S' in dir_set", "'S'", "dir_set", "not 'W' in dir_set", "'W' in dir_set", "'W'", "dir_set", "not 'E' in dir_set", "'E' in dir_set", "'E'", "dir_set", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "S = list(input())", "list(input())", "S", "dir_set = set()", "set()", "dir_set" ]
S = list(input()) dir_set = set() for s in S: dir_set.add(s) if 'N' in dir_set and 'S' in dir_set and 'W' in dir_set and 'E' in dir_set: ### "NSFW" 全部ある場合 print("Yes") elif not 'N' in dir_set and not 'S' in dir_set and 'W' in dir_set and 'E' in dir_set: ### "NS" はなく "EW" が両方ある場合 print("Yes") elif 'N' in dir_set and 'S' in dir_set and not 'W' in dir_set and not 'E' in dir_set: ### "NS" が両方あり "EW" がない場合 print("Yes") else: ### 上記以外 print("No")
[ 7, 0, 13, 4, 13, 14, 2, 2, 2, 17, 13, 2, 17, 13, 2, 40, 17, 13, 40, 17, 13, 14, 2, 2, 2, 17, 13, 2, 17, 13, 2, 40, 17, 13, 40, 17, 13, 4, 13, 17, 4, 13, 4, 13, 17, 10, 4, 13 ]
[ [ 46, 2 ], [ 47, 10 ], [ 47, 13 ], [ 47, 17 ], [ 47, 20 ], [ 47, 26 ], [ 47, 29 ], [ 47, 33 ], [ 47, 36 ], [ 46, 47 ] ]
[ "s = input()\n\nif ('N' in s and 'S' in s) or ('N' not in s and 'S' not in s):\n if ('W' in s and 'E' in s) or ('W' not in s and 'E' not in s):\n print('Yes')\n exit()\n\nprint('No')", "s = input()", "s", "input()", "input", "if ('N' in s and 'S' in s) or ('N' not in s and 'S' not in s):\n if ('W' in s and 'E' in s) or ('W' not in s and 'E' not in s):\n print('Yes')\n exit()", "('N' in s and 'S' in s) or ('N' not in s and 'S' not in s)", "'N' in s and 'S' in s", "'N' in s", "'N'", "s", "'S' in s", "'S'", "s", "'N' not in s and 'S' not in s", "'N' not in s", "'N'", "s", "'S' not in s", "'S'", "s", "if ('W' in s and 'E' in s) or ('W' not in s and 'E' not in s):\n print('Yes')\n exit()", "('W' in s and 'E' in s) or ('W' not in s and 'E' not in s)", "'W' in s and 'E' in s", "'W' in s", "'W'", "s", "'E' in s", "'E'", "s", "'W' not in s and 'E' not in s", "'W' not in s", "'W'", "s", "'E' not in s", "'E'", "s", "print('Yes')", "print", "'Yes'", "exit()", "exit", "print('No')", "print", "'No'", "s = input()", "input()", "s" ]
s = input() if ('N' in s and 'S' in s) or ('N' not in s and 'S' not in s): if ('W' in s and 'E' in s) or ('W' not in s and 'E' not in s): print('Yes') exit() print('No')
[ 7, 0, 13, 4, 13, 0, 13, 39, 39, 17, 17, 17, 17, 39, 17, 17, 17, 17, 39, 17, 17, 17, 17, 0, 13, 2, 39, 17, 17, 28, 13, 13, 14, 2, 13, 17, 0, 18, 13, 17, 17, 14, 2, 13, 17, 0, 18, 13, 17, 17, 14, 2, 13, 17, 0, 18, 13, 17, 17, 0, 18, 13, 17, 17, 14, 2, 13, 13, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 39, 13, 10, 2, 13 ]
[ [ 75, 2 ], [ 78, 6 ], [ 81, 24 ], [ 31, 30 ], [ 76, 30 ], [ 30, 34 ], [ 40, 37 ], [ 82, 38 ], [ 30, 43 ], [ 49, 46 ], [ 82, 47 ], [ 30, 52 ], [ 58, 55 ], [ 82, 56 ], [ 63, 60 ], [ 82, 61 ], [ 82, 66 ], [ 79, 67 ], [ 75, 76 ], [ 78, 79 ], [ 81, 82 ] ]
[ "s = input()\nli = [[1, 1, 0, 0], [0, 0, 1, 1], [1, 1, 1, 1]]\n\ndirection = [0] * 4\n\nfor i in s:\n if i == 'N':\n direction[0] = 1\n elif i == 'S':\n direction[1] = 1\n elif i == 'W':\n direction[2] = 1\n else:\n direction[3] = 1\n\nif direction in li:\n print('Yes')\nelse:\n print('No')", "s = input()", "s", "input()", "input", "li = [[1, 1, 0, 0], [0, 0, 1, 1], [1, 1, 1, 1]]", "li", "[[1, 1, 0, 0], [0, 0, 1, 1], [1, 1, 1, 1]]", "[1, 1, 0, 0]", "1", "1", "0", "0", "[0, 0, 1, 1]", "0", "0", "1", "1", "[1, 1, 1, 1]", "1", "1", "1", "1", "direction = [0] * 4", "direction", "[0] * 4", "[0]", "0", "4", "for i in s:\n if i == 'N':\n direction[0] = 1\n elif i == 'S':\n direction[1] = 1\n elif i == 'W':\n direction[2] = 1\n else:\n direction[3] = 1", "i", "s", "if i == 'N':\n direction[0] = 1\n elif i == 'S':\n direction[1] = 1\n elif i == 'W':\n direction[2] = 1\n else:\n direction[3] = 1", "i == 'N'", "i", "'N'", "direction[0] = 1", "direction[0]", "direction", "0", "1", "elif i == 'S':\n direction[1] = 1\n ", "i == 'S'", "i", "'S'", "direction[1] = 1", "direction[1]", "direction", "1", "1", "elif i == 'W':\n direction[2] = 1\n ", "i == 'W'", "i", "'W'", "direction[2] = 1", "direction[2]", "direction", "2", "1", "direction[3] = 1", "direction[3]", "direction", "3", "1", "if direction in li:\n print('Yes')\nelse:\n print('No')", "direction in li", "direction", "li", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "s = input()", "input()", "s", "li = [[1, 1, 0, 0], [0, 0, 1, 1], [1, 1, 1, 1]]", "[[1, 1, 0, 0], [0, 0, 1, 1], [1, 1, 1, 1]]", "li", "direction = [0] * 4", "[0] * 4", "direction" ]
s = input() li = [[1, 1, 0, 0], [0, 0, 1, 1], [1, 1, 1, 1]] direction = [0] * 4 for i in s: if i == 'N': direction[0] = 1 elif i == 'S': direction[1] = 1 elif i == 'W': direction[2] = 1 else: direction[3] = 1 if direction in li: print('Yes') else: print('No')
[ 7, 0, 13, 4, 13, 14, 2, 2, 2, 17, 13, 2, 17, 13, 2, 2, 17, 13, 2, 17, 13, 4, 13, 17, 4, 13, 17, 10, 4, 13 ]
[ [ 28, 2 ], [ 29, 10 ], [ 29, 13 ], [ 29, 17 ], [ 29, 20 ], [ 28, 29 ] ]
[ "s = input()\nif ('N' in s) ^ ('S'in s) or ('W' in s) ^ ('E' in s):\n print('No')\nelse:\n print('Yes')", "s = input()", "s", "input()", "input", "if ('N' in s) ^ ('S'in s) or ('W' in s) ^ ('E' in s):\n print('No')\nelse:\n print('Yes')", "('N' in s) ^ ('S'in s) or ('W' in s) ^ ('E' in s)", "('N' in s) ^ ('S'in s)", "'N' in s", "'N'", "s", "'S'in s", "'S'", "s", "('W' in s) ^ ('E' in s)", "'W' in s", "'W'", "s", "'E' in s", "'E'", "s", "print('No')", "print", "'No'", "print('Yes')", "print", "'Yes'", "s = input()", "input()", "s" ]
s = input() if ('N' in s) ^ ('S'in s) or ('W' in s) ^ ('E' in s): print('No') else: print('Yes')
[ 7, 0, 13, 4, 13, 0, 13, 17, 14, 2, 17, 13, 14, 40, 17, 13, 0, 13, 17, 14, 2, 17, 13, 14, 40, 17, 13, 0, 13, 17, 14, 2, 17, 13, 14, 40, 17, 13, 0, 13, 17, 14, 2, 17, 13, 14, 40, 17, 13, 0, 13, 17, 14, 2, 13, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 63, 2 ], [ 66, 6 ], [ 64, 11 ], [ 64, 15 ], [ 69, 17 ], [ 64, 22 ], [ 64, 26 ], [ 72, 28 ], [ 64, 33 ], [ 64, 37 ], [ 75, 39 ], [ 64, 44 ], [ 64, 48 ], [ 78, 50 ], [ 79, 54 ], [ 76, 54 ], [ 73, 54 ], [ 70, 54 ], [ 67, 54 ], [ 63, 64 ], [ 66, 67 ], [ 69, 70 ], [ 72, 73 ], [ 75, 76 ], [ 78, 79 ] ]
[ "S = input()\ncount =0\nif 'S' in S:\n if 'N' not in S:\n count = 1\nif 'N' in S:\n if 'S' not in S:\n count = 1\nif 'W' in S:\n if 'E' not in S:\n count = 1\nif 'E' in S:\n if 'W' not in S:\n count = 1\nif count ==1:\n print('No')\nelse:\n print('Yes')", "S = input()", "S", "input()", "input", "count =0", "count", "0", "if 'S' in S:\n if 'N' not in S:\n count = 1", "'S' in S", "'S'", "S", "if 'N' not in S:\n count = 1", "'N' not in S", "'N'", "S", "count = 1", "count", "1", "if 'N' in S:\n if 'S' not in S:\n count = 1", "'N' in S", "'N'", "S", "if 'S' not in S:\n count = 1", "'S' not in S", "'S'", "S", "count = 1", "count", "1", "if 'W' in S:\n if 'E' not in S:\n count = 1", "'W' in S", "'W'", "S", "if 'E' not in S:\n count = 1", "'E' not in S", "'E'", "S", "count = 1", "count", "1", "if 'E' in S:\n if 'W' not in S:\n count = 1", "'E' in S", "'E'", "S", "if 'W' not in S:\n count = 1", "'W' not in S", "'W'", "S", "count = 1", "count", "1", "if count ==1:\n print('No')\nelse:\n print('Yes')", "count ==1", "count", "1", "print('No')", "print", "'No'", "print('Yes')", "print", "'Yes'", "S = input()", "input()", "S", "count =0", "0", "count", "count = 1", "1", "count", "count = 1", "1", "count", "count = 1", "1", "count", "count = 1", "1", "count" ]
S = input() count =0 if 'S' in S: if 'N' not in S: count = 1 if 'N' in S: if 'S' not in S: count = 1 if 'W' in S: if 'E' not in S: count = 1 if 'E' in S: if 'W' not in S: count = 1 if count ==1: print('No') else: print('Yes')
[ 7, 0, 13, 4, 13, 0, 13, 39, 2, 2, 17, 13, 40, 17, 13, 2, 40, 17, 13, 2, 17, 13, 2, 2, 17, 13, 40, 17, 13, 2, 40, 17, 13, 2, 17, 13, 4, 13, 8, 4, 13, 13, 17, 17, 10, 4, 13, 10, 39, 13 ]
[ [ 45, 2 ], [ 48, 6 ], [ 46, 11 ], [ 46, 14 ], [ 46, 18 ], [ 46, 21 ], [ 46, 25 ], [ 46, 28 ], [ 46, 32 ], [ 46, 35 ], [ 49, 41 ], [ 45, 46 ], [ 48, 49 ] ]
[ "S = input()\ncannot = [\n \"N\" in S and \"S\" not in S,\n \"N\" not in S and \"S\" in S,\n \"W\" in S and \"E\" not in S,\n \"W\" not in S and \"E\" in S,\n]\nprint(\"No\" if any(cannot) else \"Yes\")", "S = input()", "S", "input()", "input", "cannot = [\n \"N\" in S and \"S\" not in S,\n \"N\" not in S and \"S\" in S,\n \"W\" in S and \"E\" not in S,\n \"W\" not in S and \"E\" in S,\n]", "cannot", "[\n \"N\" in S and \"S\" not in S,\n \"N\" not in S and \"S\" in S,\n \"W\" in S and \"E\" not in S,\n \"W\" not in S and \"E\" in S,\n]", "\"N\" in S and \"S\" not in S", "\"N\" in S", "\"N\"", "S", "\"S\" not in S", "\"S\"", "S", "\"N\" not in S and \"S\" in S", "\"N\" not in S", "\"N\"", "S", "\"S\" in S", "\"S\"", "S", "\"W\" in S and \"E\" not in S", "\"W\" in S", "\"W\"", "S", "\"E\" not in S", "\"E\"", "S", "\"W\" not in S and \"E\" in S", "\"W\" not in S", "\"W\"", "S", "\"E\" in S", "\"E\"", "S", "print(\"No\" if any(cannot) else \"Yes\")", "print", "\"No\" if any(cannot) else \"Yes\"", "any(cannot)", "any", "cannot", "\"No\"", "\"Yes\"", "S = input()", "input()", "S", "cannot = [\n \"N\" in S and \"S\" not in S,\n \"N\" not in S and \"S\" in S,\n \"W\" in S and \"E\" not in S,\n \"W\" not in S and \"E\" in S,\n]", "[\n \"N\" in S and \"S\" not in S,\n \"N\" not in S and \"S\" in S,\n \"W\" in S and \"E\" not in S,\n \"W\" not in S and \"E\" in S,\n]", "cannot" ]
S = input() cannot = [ "N" in S and "S" not in S, "N" not in S and "S" in S, "W" in S and "E" not in S, "W" not in S and "E" in S, ] print("No" if any(cannot) else "Yes")
[ 7, 0, 13, 4, 18, 4, 13, 13, 0, 13, 21, 22, 17, 17, 22, 17, 17, 22, 17, 17, 22, 17, 17, 28, 13, 13, 0, 18, 13, 13, 17, 12, 13, 14, 2, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 14, 2, 2, 18, 13, 17, 18, 13, 17, 17, 29, 17, 14, 2, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 14, 2, 2, 18, 13, 17, 18, 13, 17, 17, 29, 17, 29, 17, 14, 4, 13, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 21, 13, 10, 12, 13 ]
[ [ 93, 2 ], [ 96, 9 ], [ 25, 24 ], [ 94, 24 ], [ 30, 27 ], [ 97, 28 ], [ 24, 29 ], [ 97, 37 ], [ 97, 42 ], [ 97, 49 ], [ 97, 52 ], [ 97, 61 ], [ 97, 66 ], [ 97, 73 ], [ 97, 76 ], [ 100, 85 ], [ 93, 94 ], [ 96, 97 ] ]
[ "s = input().strip()\n\ncounts = {\n 'N': 0, 'W': 0, 'S': 0, 'E': 0\n}\n\nfor c in s:\n counts[c] += 1\n\n\ndef judge():\n if counts['N'] > 0 or counts['S'] > 0:\n if counts['N'] * counts['S'] == 0:\n return False\n\n if counts['W'] > 0 or counts['E'] > 0:\n if counts['W'] * counts['E'] == 0:\n return False\n\n return True\n\n\nif judge():\n print('Yes')\nelse:\n print('No')", "s = input().strip()", "s", "input().strip()", "().strip", "()", "input", "strip", "counts = {\n 'N': 0, 'W': 0, 'S': 0, 'E': 0\n}", "counts", "{\n 'N': 0, 'W': 0, 'S': 0, 'E': 0\n}", "'N'", "'N'", "0", "'W'", "'W'", "0", "'S'", "'S'", "0", "'E'", "'E'", "0", "for c in s:\n counts[c] += 1", "c", "s", "counts[c] += 1", "counts[c]", "counts", "c", "1", "def judge():\n if counts['N'] > 0 or counts['S'] > 0:\n if counts['N'] * counts['S'] == 0:\n return False\n\n if counts['W'] > 0 or counts['E'] > 0:\n if counts['W'] * counts['E'] == 0:\n return False\n\n return True", "judge", "if counts['N'] > 0 or counts['S'] > 0:\n if counts['N'] * counts['S'] == 0:\n return False\n\n ", "counts['N'] > 0 or counts['S'] > 0", "counts['N'] > 0", "counts['N']", "counts", "'N'", "0", "counts['S'] > 0", "counts['S']", "counts", "'S'", "0", "if counts['N'] * counts['S'] == 0:\n return False\n\n ", "counts['N'] * counts['S'] == 0", "counts['N'] * counts['S']", "counts['N']", "counts", "'N'", "counts['S']", "counts", "'S'", "0", "return False", "False", "if counts['W'] > 0 or counts['E'] > 0:\n if counts['W'] * counts['E'] == 0:\n return False\n\n ", "counts['W'] > 0 or counts['E'] > 0", "counts['W'] > 0", "counts['W']", "counts", "'W'", "0", "counts['E'] > 0", "counts['E']", "counts", "'E'", "0", "if counts['W'] * counts['E'] == 0:\n return False\n\n ", "counts['W'] * counts['E'] == 0", "counts['W'] * counts['E']", "counts['W']", "counts", "'W'", "counts['E']", "counts", "'E'", "0", "return False", "False", "return True", "True", "if judge():\n print('Yes')\nelse:\n print('No')", "judge()", "judge", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "s = input().strip()", "input().strip()", "s", "counts = {\n 'N': 0, 'W': 0, 'S': 0, 'E': 0\n}", "{\n 'N': 0, 'W': 0, 'S': 0, 'E': 0\n}", "counts", "def judge():\n if counts['N'] > 0 or counts['S'] > 0:\n if counts['N'] * counts['S'] == 0:\n return False\n\n if counts['W'] > 0 or counts['E'] > 0:\n if counts['W'] * counts['E'] == 0:\n return False\n\n return True", "def judge():\n if counts['N'] > 0 or counts['S'] > 0:\n if counts['N'] * counts['S'] == 0:\n return False\n\n if counts['W'] > 0 or counts['E'] > 0:\n if counts['W'] * counts['E'] == 0:\n return False\n\n return True", "judge" ]
s = input().strip() counts = { 'N': 0, 'W': 0, 'S': 0, 'E': 0 } for c in s: counts[c] += 1 def judge(): if counts['N'] > 0 or counts['S'] > 0: if counts['N'] * counts['S'] == 0: return False if counts['W'] > 0 or counts['E'] > 0: if counts['W'] * counts['E'] == 0: return False return True if judge(): print('Yes') else: print('No')
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 17, 14, 2, 17, 13, 14, 40, 17, 13, 0, 13, 17, 14, 2, 17, 13, 14, 40, 17, 13, 0, 13, 17, 14, 2, 17, 13, 14, 40, 17, 13, 0, 13, 17, 14, 2, 17, 13, 14, 40, 17, 13, 0, 13, 17, 14, 13, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 63, 2 ], [ 66, 8 ], [ 64, 13 ], [ 64, 17 ], [ 78, 19 ], [ 64, 24 ], [ 64, 28 ], [ 72, 30 ], [ 64, 35 ], [ 64, 39 ], [ 69, 41 ], [ 64, 46 ], [ 64, 50 ], [ 75, 52 ], [ 63, 64 ], [ 66, 67 ], [ 69, 70 ], [ 72, 73 ], [ 75, 76 ], [ 78, 79 ] ]
[ "S = list(input())\nflag = True\nif \"N\" in S:\n if \"S\" not in S:\n flag = False\nif \"S\" in S:\n if \"N\" not in S:\n flag = False\nif \"E\" in S:\n if \"W\" not in S:\n flag = False\nif \"W\" in S:\n if \"E\" not in S:\n flag = False\nif flag:\n print(\"Yes\")\nelse:\n print(\"No\")", "S = list(input())", "S", "list(input())", "list", "input()", "input", "flag = True", "flag", "True", "if \"N\" in S:\n if \"S\" not in S:\n flag = False", "\"N\" in S", "\"N\"", "S", "if \"S\" not in S:\n flag = False", "\"S\" not in S", "\"S\"", "S", "flag = False", "flag", "False", "if \"S\" in S:\n if \"N\" not in S:\n flag = False", "\"S\" in S", "\"S\"", "S", "if \"N\" not in S:\n flag = False", "\"N\" not in S", "\"N\"", "S", "flag = False", "flag", "False", "if \"E\" in S:\n if \"W\" not in S:\n flag = False", "\"E\" in S", "\"E\"", "S", "if \"W\" not in S:\n flag = False", "\"W\" not in S", "\"W\"", "S", "flag = False", "flag", "False", "if \"W\" in S:\n if \"E\" not in S:\n flag = False", "\"W\" in S", "\"W\"", "S", "if \"E\" not in S:\n flag = False", "\"E\" not in S", "\"E\"", "S", "flag = False", "flag", "False", "if flag:\n print(\"Yes\")\nelse:\n print(\"No\")", "flag", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "S = list(input())", "list(input())", "S", "flag = True", "True", "flag", "flag = False", "False", "flag", "flag = False", "False", "flag", "flag = False", "False", "flag", "flag = False", "False", "flag" ]
S = list(input()) flag = True if "N" in S: if "S" not in S: flag = False if "S" in S: if "N" not in S: flag = False if "E" in S: if "W" not in S: flag = False if "W" in S: if "E" not in S: flag = False if flag: print("Yes") else: print("No")
[ 7, 0, 13, 4, 13, 14, 2, 2, 2, 2, 2, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 2, 2, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 2, 2, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 2, 2, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 4, 13, 17, 10, 4, 13 ]
[ [ 73, 2 ], [ 74, 13 ], [ 74, 20 ], [ 74, 28 ], [ 74, 35 ], [ 74, 43 ], [ 74, 50 ], [ 74, 58 ], [ 74, 65 ], [ 73, 74 ] ]
[ "S = input()\n\nif (S.count(\"W\")>0 and S.count(\"E\")==0) or (S.count(\"E\")>0 and S.count(\"W\")==0) or (S.count(\"N\")>0 and S.count(\"S\")==0) or (S.count(\"S\")>0 and S.count(\"N\")==0): print(\"No\")\nelse:\n print(\"Yes\")", "S = input()", "S", "input()", "input", "if (S.count(\"W\")>0 and S.count(\"E\")==0) or (S.count(\"E\")>0 and S.count(\"W\")==0) or (S.count(\"N\")>0 and S.count(\"S\")==0) or (S.count(\"S\")>0 and S.count(\"N\")==0): print(\"No\")\nelse:\n print(\"Yes\")", "(S.count(\"W\")>0 and S.count(\"E\")==0) or (S.count(\"E\")>0 and S.count(\"W\")==0) or (S.count(\"N\")>0 and S.count(\"S\")==0) or (S.count(\"S\")>0 and S.count(\"N\")==0)", "(S.count(\"W\")>0 and S.count(\"E\")==0) or (S.count(\"E\")>0 and S.count(\"W\")==0) or (S.count(\"N\")>0 and S.count(\"S\")==0)", "(S.count(\"W\")>0 and S.count(\"E\")==0) or (S.count(\"E\")>0 and S.count(\"W\")==0)", "S.count(\"W\")>0 and S.count(\"E\")==0", "S.count(\"W\")>0", "S.count(\"W\")", "S.count", "S", "count", "\"W\"", "0", "S.count(\"E\")==0", "S.count(\"E\")", "S.count", "S", "count", "\"E\"", "0", "S.count(\"E\")>0 and S.count(\"W\")==0", "S.count(\"E\")>0", "S.count(\"E\")", "S.count", "S", "count", "\"E\"", "0", "S.count(\"W\")==0", "S.count(\"W\")", "S.count", "S", "count", "\"W\"", "0", "S.count(\"N\")>0 and S.count(\"S\")==0", "S.count(\"N\")>0", "S.count(\"N\")", "S.count", "S", "count", "\"N\"", "0", "S.count(\"S\")==0", "S.count(\"S\")", "S.count", "S", "count", "\"S\"", "0", "S.count(\"S\")>0 and S.count(\"N\")==0", "S.count(\"S\")>0", "S.count(\"S\")", "S.count", "S", "count", "\"S\"", "0", "S.count(\"N\")==0", "S.count(\"N\")", "S.count", "S", "count", "\"N\"", "0", "print(\"Yes\")", "print", "\"Yes\"", "S = input()", "input()", "S" ]
S = input() if (S.count("W")>0 and S.count("E")==0) or (S.count("E")>0 and S.count("W")==0) or (S.count("N")>0 and S.count("S")==0) or (S.count("S")>0 and S.count("N")==0): print("No") else: print("Yes")
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 4, 13, 28, 13, 4, 13, 13, 0, 13, 18, 13, 13, 0, 18, 13, 13, 13, 14, 2, 17, 13, 14, 2, 17, 13, 4, 13, 17, 4, 13, 14, 2, 17, 13, 14, 2, 17, 13, 4, 13, 17, 4, 13, 14, 2, 17, 13, 14, 2, 17, 13, 4, 13, 17, 4, 13, 14, 2, 17, 13, 14, 2, 17, 13, 4, 13, 17, 4, 13, 4, 13, 17, 10, 4, 13, 10, 4, 13, 10, 18, 13, 10, 4, 13 ]
[ [ 85, 2 ], [ 94, 6 ], [ 86, 9 ], [ 88, 11 ], [ 16, 15 ], [ 95, 18 ], [ 91, 20 ], [ 86, 22 ], [ 15, 23 ], [ 28, 25 ], [ 89, 26 ], [ 92, 27 ], [ 92, 28 ], [ 89, 32 ], [ 89, 36 ], [ 89, 45 ], [ 89, 49 ], [ 89, 58 ], [ 89, 62 ], [ 89, 71 ], [ 89, 75 ], [ 85, 86 ], [ 88, 89 ], [ 91, 92 ], [ 94, 95 ] ]
[ "S=input()\nN=len(S)\nx=dict()\nfor i in range(N):\n s = S[i]\n x[s]=s\n\nif \"N\" in x:\n if \"S\" in x:\n pass\n else:\n print(\"No\")\n exit()\n\nif \"S\" in x:\n if \"N\" in x:\n pass\n else:\n print(\"No\")\n exit()\n\nif \"W\" in x:\n if \"E\" in x:\n pass\n else:\n print(\"No\")\n exit()\n\nif \"E\" in x:\n if \"W\" in x:\n pass\n else:\n print(\"No\")\n exit()\n\nprint(\"Yes\")", "S=input()", "S", "input()", "input", "N=len(S)", "N", "len(S)", "len", "S", "x=dict()", "x", "dict()", "dict", "for i in range(N):\n s = S[i]\n x[s]=s", "i", "range(N)", "range", "N", "s = S[i]", "s", "S[i]", "S", "i", "x[s]=s", "x[s]", "x", "s", "s", "if \"N\" in x:\n if \"S\" in x:\n pass\n else:\n print(\"No\")\n exit()", "\"N\" in x", "\"N\"", "x", "if \"S\" in x:\n pass\n else:\n print(\"No\")\n exit()", "\"S\" in x", "\"S\"", "x", "print(\"No\")", "print", "\"No\"", "exit()", "exit", "if \"S\" in x:\n if \"N\" in x:\n pass\n else:\n print(\"No\")\n exit()", "\"S\" in x", "\"S\"", "x", "if \"N\" in x:\n pass\n else:\n print(\"No\")\n exit()", "\"N\" in x", "\"N\"", "x", "print(\"No\")", "print", "\"No\"", "exit()", "exit", "if \"W\" in x:\n if \"E\" in x:\n pass\n else:\n print(\"No\")\n exit()", "\"W\" in x", "\"W\"", "x", "if \"E\" in x:\n pass\n else:\n print(\"No\")\n exit()", "\"E\" in x", "\"E\"", "x", "print(\"No\")", "print", "\"No\"", "exit()", "exit", "if \"E\" in x:\n if \"W\" in x:\n pass\n else:\n print(\"No\")\n exit()", "\"E\" in x", "\"E\"", "x", "if \"W\" in x:\n pass\n else:\n print(\"No\")\n exit()", "\"W\" in x", "\"W\"", "x", "print(\"No\")", "print", "\"No\"", "exit()", "exit", "print(\"Yes\")", "print", "\"Yes\"", "S=input()", "input()", "S", "x=dict()", "dict()", "x", "s = S[i]", "S[i]", "s", "N=len(S)", "len(S)", "N" ]
S=input() N=len(S) x=dict() for i in range(N): s = S[i] x[s]=s if "N" in x: if "S" in x: pass else: print("No") exit() if "S" in x: if "N" in x: pass else: print("No") exit() if "W" in x: if "E" in x: pass else: print("No") exit() if "E" in x: if "W" in x: pass else: print("No") exit() print("Yes")
[ 7, 15, 13, 13, 15, 15, 4, 18, 13, 13, 2, 17, 17, 0, 13, 2, 2, 17, 17, 17, 12, 13, 29, 18, 4, 18, 18, 13, 13, 13, 39, 17, 12, 13, 29, 4, 13, 13, 4, 18, 4, 13, 13, 12, 13, 29, 4, 13, 4, 13, 12, 13, 41, 28, 13, 4, 13, 13, 4, 4, 13, 4, 13, 0, 13, 13, 41, 28, 13, 4, 13, 31, 13, 4, 4, 13, 13, 29, 13, 23, 13, 0, 13, 4, 13, 4, 13, 14, 2, 2, 2, 13, 17, 2, 13, 17, 2, 13, 17, 4, 13, 17, 4, 13, 17, 10, 12, 13, 10, 12, 13, 10, 2, 13, 10, 12, 13, 10, 12, 13, 10, 4, 13 ]
[ [ 112, 14 ], [ 119, 41 ], [ 119, 49 ], [ 55, 54 ], [ 80, 57 ], [ 116, 62 ], [ 65, 64 ], [ 69, 68 ], [ 64, 72 ], [ 68, 76 ], [ 80, 80 ], [ 121, 82 ], [ 119, 86 ], [ 122, 91 ], [ 122, 94 ], [ 122, 97 ], [ 112, 113 ], [ 121, 122 ] ]
[ "import sys, math\nfrom functools import lru_cache\nfrom collections import deque\nsys.setrecursionlimit(10**9)\nMOD = 10**9+7\n\ndef input():\n return sys.stdin.readline()[:-1]\n\ndef mi():\n return map(int, input().split())\n\ndef ii():\n return int(input())\n\ndef i2(n):\n tmp = [list(mi()) for i in range(n)]\n return [list(i) for i in zip(*tmp)]\n\nS = set(input())\nif S == {'N', 'S'} or S == {'W', 'E'} or S == {'W', 'E', 'N', 'S'}:\n print('Yes')\nelse:\n print('No')", "import sys, math", "sys", "math", "from functools import lru_cache", "from collections import deque", "sys.setrecursionlimit(10**9)", "sys.setrecursionlimit", "sys", "setrecursionlimit", "10**9", "10", "9", "MOD = 10**9+7", "MOD", "10**9+7", "10**9", "10", "9", "7", "def input():\n return sys.stdin.readline()[:-1]", "input", "return sys.stdin.readline()[:-1]", "sys.stdin.readline()[:-1]", "sys.stdin.readline()", "sys.stdin.readline", "sys.stdin", "sys", "stdin", "readline", ":-1", "-1", "def mi():\n return map(int, input().split())", "mi", "return map(int, input().split())", "map(int, input().split())", "map", "int", "input().split()", "().split", "()", "input", "split", "def ii():\n return int(input())", "ii", "return int(input())", "int(input())", "int", "input()", "input", "def i2(n):\n tmp = [list(mi()) for i in range(n)]\n return [list(i) for i in zip(*tmp)]", "i2", "list(mi()) for i in range(n)", "for i in range(n)", "i", "range(n)", "range", "n", "for i in range(n)", "list(mi())", "list", "mi()", "mi", "tmp = [list(mi()) for i in range(n)]", "tmp", "[list(mi()) for i in range(n)]", "list(i) for i in zip(*tmp)", "for i in zip(*tmp)", "i", "zip(*tmp)", "zip", "*tmp", "tmp", "for i in zip(*tmp)", "list(i)", "list", "i", "return [list(i) for i in zip(*tmp)]", "[list(i) for i in zip(*tmp)]", "n", "n", "S = set(input())", "S", "set(input())", "set", "input()", "input", "if S == {'N', 'S'} or S == {'W', 'E'} or S == {'W', 'E', 'N', 'S'}:\n print('Yes')\nelse:\n print('No')", "S == {'N', 'S'} or S == {'W', 'E'} or S == {'W', 'E', 'N', 'S'}", "S == {'N', 'S'} or S == {'W', 'E'}", "S == {'N', 'S'}", "S", "{'N', 'S'}", "S == {'W', 'E'}", "S", "{'W', 'E'}", "S == {'W', 'E', 'N', 'S'}", "S", "{'W', 'E', 'N', 'S'}", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "def i2(n):\n tmp = [list(mi()) for i in range(n)]\n return [list(i) for i in zip(*tmp)]", "def i2(n):\n tmp = [list(mi()) for i in range(n)]\n return [list(i) for i in zip(*tmp)]", "i2", "def ii():\n return int(input())", "def ii():\n return int(input())", "ii", "MOD = 10**9+7", "10**9+7", "MOD", "def mi():\n return map(int, input().split())", "def mi():\n return map(int, input().split())", "mi", "def input():\n return sys.stdin.readline()[:-1]", "def input():\n return sys.stdin.readline()[:-1]", "input", "S = set(input())", "set(input())", "S" ]
import sys, math from functools import lru_cache from collections import deque sys.setrecursionlimit(10**9) MOD = 10**9+7 def input(): return sys.stdin.readline()[:-1] def mi(): return map(int, input().split()) def ii(): return int(input()) def i2(n): tmp = [list(mi()) for i in range(n)] return [list(i) for i in zip(*tmp)] S = set(input()) if S == {'N', 'S'} or S == {'W', 'E'} or S == {'W', 'E', 'N', 'S'}: print('Yes') else: print('No')
[ 7, 0, 13, 4, 13, 14, 2, 17, 13, 14, 2, 2, 17, 13, 17, 4, 13, 17, 4, 13, 14, 2, 17, 13, 14, 2, 2, 17, 13, 17, 4, 13, 17, 4, 13, 14, 2, 17, 13, 14, 2, 2, 17, 13, 17, 4, 13, 17, 4, 13, 14, 2, 17, 13, 14, 2, 2, 17, 13, 17, 4, 13, 17, 4, 13, 4, 13, 17, 10, 4, 13 ]
[ [ 69, 2 ], [ 70, 8 ], [ 70, 13 ], [ 70, 23 ], [ 70, 28 ], [ 70, 38 ], [ 70, 43 ], [ 70, 53 ], [ 70, 58 ], [ 69, 70 ] ]
[ "st = input()\nif \"N\" in st:\n if (\"S\" in st) is False:\n print(\"No\")\n exit()\nif \"W\" in st:\n if (\"E\" in st) is False:\n print(\"No\")\n exit()\nif \"S\" in st:\n if (\"N\" in st) is False:\n print(\"No\")\n exit()\nif \"E\" in st:\n if (\"W\" in st) is False:\n print(\"No\")\n exit()\nprint(\"Yes\")", "st = input()", "st", "input()", "input", "if \"N\" in st:\n if (\"S\" in st) is False:\n print(\"No\")\n exit()", "\"N\" in st", "\"N\"", "st", "if (\"S\" in st) is False:\n print(\"No\")\n exit()", "(\"S\" in st) is False", "\"S\" in st", "\"S\"", "st", "False", "print(\"No\")", "print", "\"No\"", "exit()", "exit", "if \"W\" in st:\n if (\"E\" in st) is False:\n print(\"No\")\n exit()", "\"W\" in st", "\"W\"", "st", "if (\"E\" in st) is False:\n print(\"No\")\n exit()", "(\"E\" in st) is False", "\"E\" in st", "\"E\"", "st", "False", "print(\"No\")", "print", "\"No\"", "exit()", "exit", "if \"S\" in st:\n if (\"N\" in st) is False:\n print(\"No\")\n exit()", "\"S\" in st", "\"S\"", "st", "if (\"N\" in st) is False:\n print(\"No\")\n exit()", "(\"N\" in st) is False", "\"N\" in st", "\"N\"", "st", "False", "print(\"No\")", "print", "\"No\"", "exit()", "exit", "if \"E\" in st:\n if (\"W\" in st) is False:\n print(\"No\")\n exit()", "\"E\" in st", "\"E\"", "st", "if (\"W\" in st) is False:\n print(\"No\")\n exit()", "(\"W\" in st) is False", "\"W\" in st", "\"W\"", "st", "False", "print(\"No\")", "print", "\"No\"", "exit()", "exit", "print(\"Yes\")", "print", "\"Yes\"", "st = input()", "input()", "st" ]
st = input() if "N" in st: if ("S" in st) is False: print("No") exit() if "W" in st: if ("E" in st) is False: print("No") exit() if "S" in st: if ("N" in st) is False: print("No") exit() if "E" in st: if ("W" in st) is False: print("No") exit() print("Yes")
[ 7, 0, 13, 4, 13, 41, 28, 13, 13, 4, 13, 0, 13, 14, 2, 2, 2, 4, 13, 13, 17, 2, 13, 17, 2, 13, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 13 ]
[ [ 34, 2 ], [ 8, 7 ], [ 35, 7 ], [ 7, 10 ], [ 37, 19 ], [ 35, 19 ], [ 37, 22 ], [ 35, 22 ], [ 37, 25 ], [ 35, 25 ], [ 34, 35 ] ]
[ "#!/usr/bin/env python3\ns = input()\ns = {i for i in s}\nif len(s) == 4 or s == {\"N\", \"S\"} or s == {\"W\", \"E\"}:\n print(\"Yes\")\nelse:\n print(\"No\")", "s = input()", "s", "input()", "input", "i for i in s", "for i in s", "i", "s", "for i in s", "i", "s = {i for i in s}", "s", "if len(s) == 4 or s == {\"N\", \"S\"} or s == {\"W\", \"E\"}:\n print(\"Yes\")\nelse:\n print(\"No\")", "len(s) == 4 or s == {\"N\", \"S\"} or s == {\"W\", \"E\"}", "len(s) == 4 or s == {\"N\", \"S\"}", "len(s) == 4", "len(s)", "len", "s", "4", "s == {\"N\", \"S\"}", "s", "{\"N\", \"S\"}", "s == {\"W\", \"E\"}", "s", "{\"W\", \"E\"}", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "s = input()", "input()", "s", "s = {i for i in s}", "s" ]
#!/usr/bin/env python3 s = input() s = {i for i in s} if len(s) == 4 or s == {"N", "S"} or s == {"W", "E"}: print("Yes") else: print("No")
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 14, 2, 2, 2, 13, 17, 2, 13, 17, 2, 13, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13 ]
[ [ 29, 2 ], [ 32, 6 ], [ 30, 9 ], [ 33, 14 ], [ 30, 14 ], [ 33, 17 ], [ 30, 17 ], [ 33, 20 ], [ 30, 20 ], [ 29, 30 ], [ 32, 33 ] ]
[ "s=input()\ns=set(s)\nif s=={\"N\",\"E\",\"S\",\"W\"} or s=={\"N\",\"S\"} or s=={\"E\",\"W\"}:\n print('Yes')\nelse:\n print('No')", "s=input()", "s", "input()", "input", "s=set(s)", "s", "set(s)", "set", "s", "if s=={\"N\",\"E\",\"S\",\"W\"} or s=={\"N\",\"S\"} or s=={\"E\",\"W\"}:\n print('Yes')\nelse:\n print('No')", "s=={\"N\",\"E\",\"S\",\"W\"} or s=={\"N\",\"S\"} or s=={\"E\",\"W\"}", "s=={\"N\",\"E\",\"S\",\"W\"} or s=={\"N\",\"S\"}", "s=={\"N\",\"E\",\"S\",\"W\"}", "s", "{\"N\",\"E\",\"S\",\"W\"}", "s=={\"N\",\"S\"}", "s", "{\"N\",\"S\"}", "s=={\"E\",\"W\"}", "s", "{\"E\",\"W\"}", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "s=input()", "input()", "s", "s=set(s)", "set(s)", "s" ]
s=input() s=set(s) if s=={"N","E","S","W"} or s=={"N","S"} or s=={"E","W"}: print('Yes') else: print('No')
[ 7, 0, 13, 4, 13, 0, 13, 39, 39, 17, 17, 39, 17, 17, 28, 13, 13, 14, 2, 18, 13, 17, 13, 14, 40, 18, 13, 17, 13, 4, 13, 17, 4, 13, 17, 14, 2, 18, 13, 17, 13, 14, 40, 18, 13, 17, 13, 4, 13, 17, 4, 13, 17, 4, 13, 17, 10, 39, 13, 10, 4, 13 ]
[ [ 60, 2 ], [ 57, 6 ], [ 16, 15 ], [ 58, 15 ], [ 15, 20 ], [ 61, 22 ], [ 15, 26 ], [ 61, 28 ], [ 15, 38 ], [ 61, 40 ], [ 15, 44 ], [ 61, 46 ], [ 57, 58 ], [ 60, 61 ] ]
[ "s = input()\n\nL = [['W', 'E'], ['S', 'N']]\n\nfor l in L:\n if l[0] in s:\n if l[1] not in s:\n print(\"No\")\n exit(0)\n if l[1] in s:\n if l[0] not in s:\n print(\"No\")\n exit(0)\n\nprint(\"Yes\")", "s = input()", "s", "input()", "input", "L = [['W', 'E'], ['S', 'N']]", "L", "[['W', 'E'], ['S', 'N']]", "['W', 'E']", "'W'", "'E'", "['S', 'N']", "'S'", "'N'", "for l in L:\n if l[0] in s:\n if l[1] not in s:\n print(\"No\")\n exit(0)\n if l[1] in s:\n if l[0] not in s:\n print(\"No\")\n exit(0)", "l", "L", "if l[0] in s:\n if l[1] not in s:\n print(\"No\")\n exit(0)\n ", "l[0] in s", "l[0]", "l", "0", "s", "if l[1] not in s:\n print(\"No\")\n exit(0)\n ", "l[1] not in s", "l[1]", "l", "1", "s", "print(\"No\")", "print", "\"No\"", "exit(0)", "exit", "0", "if l[1] in s:\n if l[0] not in s:\n print(\"No\")\n exit(0)", "l[1] in s", "l[1]", "l", "1", "s", "if l[0] not in s:\n print(\"No\")\n exit(0)", "l[0] not in s", "l[0]", "l", "0", "s", "print(\"No\")", "print", "\"No\"", "exit(0)", "exit", "0", "print(\"Yes\")", "print", "\"Yes\"", "L = [['W', 'E'], ['S', 'N']]", "[['W', 'E'], ['S', 'N']]", "L", "s = input()", "input()", "s" ]
s = input() L = [['W', 'E'], ['S', 'N']] for l in L: if l[0] in s: if l[1] not in s: print("No") exit(0) if l[1] in s: if l[0] not in s: print("No") exit(0) print("Yes")
[ 7, 0, 13, 4, 13, 15, 0, 13, 4, 13, 13, 14, 2, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 4, 13, 17, 4, 13, 14, 2, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 4, 13, 17, 4, 13, 14, 2, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 4, 13, 17, 4, 13, 14, 2, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 4, 13, 17, 4, 13, 4, 13, 17, 10, 4, 13, 10, 4, 13 ]
[ [ 83, 2 ], [ 86, 7 ], [ 84, 10 ], [ 87, 15 ], [ 87, 20 ], [ 87, 32 ], [ 87, 37 ], [ 87, 49 ], [ 87, 54 ], [ 87, 66 ], [ 87, 71 ], [ 83, 84 ], [ 86, 87 ] ]
[ "s = input() #sys.stdin.readlineは最後が改行\n\nfrom collections import Counter\n\nc = Counter(s)\n\nif c['N'] >0 and c['S']==0:\n print('No')\n exit()\nif c['S'] >0 and c['N']==0:\n print('No')\n exit()\nif c['W'] >0 and c['E']==0:\n print('No')\n exit()\nif c['E'] >0 and c['W']==0:\n print('No')\n exit()\n\nprint('Yes')", "s = input()", "s", "input()", "input", "from collections import Counter", "c = Counter(s)", "c", "Counter(s)", "Counter", "s", "if c['N'] >0 and c['S']==0:\n print('No')\n exit()", "c['N'] >0 and c['S']==0", "c['N'] >0", "c['N']", "c", "'N'", "0", "c['S']==0", "c['S']", "c", "'S'", "0", "print('No')", "print", "'No'", "exit()", "exit", "if c['S'] >0 and c['N']==0:\n print('No')\n exit()", "c['S'] >0 and c['N']==0", "c['S'] >0", "c['S']", "c", "'S'", "0", "c['N']==0", "c['N']", "c", "'N'", "0", "print('No')", "print", "'No'", "exit()", "exit", "if c['W'] >0 and c['E']==0:\n print('No')\n exit()", "c['W'] >0 and c['E']==0", "c['W'] >0", "c['W']", "c", "'W'", "0", "c['E']==0", "c['E']", "c", "'E'", "0", "print('No')", "print", "'No'", "exit()", "exit", "if c['E'] >0 and c['W']==0:\n print('No')\n exit()", "c['E'] >0 and c['W']==0", "c['E'] >0", "c['E']", "c", "'E'", "0", "c['W']==0", "c['W']", "c", "'W'", "0", "print('No')", "print", "'No'", "exit()", "exit", "print('Yes')", "print", "'Yes'", "s = input()", "input()", "s", "c = Counter(s)", "Counter(s)", "c" ]
s = input() #sys.stdin.readlineは最後が改行 from collections import Counter c = Counter(s) if c['N'] >0 and c['S']==0: print('No') exit() if c['S'] >0 and c['N']==0: print('No') exit() if c['W'] >0 and c['E']==0: print('No') exit() if c['E'] >0 and c['W']==0: print('No') exit() print('Yes')
[ 7, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 4, 13, 13, 0, 13, 2, 13, 2, 18, 13, 13, 17, 0, 13, 2, 13, 2, 18, 13, 13, 17, 0, 13, 2, 13, 2, 18, 13, 13, 17, 0, 13, 2, 13, 2, 18, 13, 13, 17, 0, 13, 17, 0, 13, 2, 2, 13, 13, 2, 40, 13, 40, 13, 0, 13, 2, 13, 2, 2, 13, 13, 2, 40, 13, 40, 13, 4, 13, 8, 13, 17, 17, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 2, 13, 10, 17, 13, 10, 2, 13, 10, 17, 13, 10, 2, 13, 10, 2, 13, 10, 2, 13, 10, 2, 13 ]
[ [ 94, 2 ], [ 109, 6 ], [ 97, 9 ], [ 103, 12 ], [ 100, 15 ], [ 19, 18 ], [ 95, 23 ], [ 121, 25 ], [ 110, 27 ], [ 122, 27 ], [ 95, 30 ], [ 18, 31 ], [ 124, 34 ], [ 98, 36 ], [ 125, 36 ], [ 95, 39 ], [ 18, 40 ], [ 118, 43 ], [ 104, 45 ], [ 119, 45 ], [ 95, 48 ], [ 18, 49 ], [ 112, 52 ], [ 101, 54 ], [ 113, 54 ], [ 95, 57 ], [ 18, 58 ], [ 115, 61 ], [ 106, 64 ], [ 122, 67 ], [ 110, 67 ], [ 125, 68 ], [ 98, 68 ], [ 122, 71 ], [ 110, 71 ], [ 125, 73 ], [ 98, 73 ], [ 127, 75 ], [ 107, 77 ], [ 116, 77 ], [ 119, 80 ], [ 104, 80 ], [ 113, 81 ], [ 101, 81 ], [ 119, 84 ], [ 104, 84 ], [ 113, 86 ], [ 101, 86 ], [ 128, 90 ], [ 107, 90 ], [ 116, 90 ], [ 94, 95 ], [ 97, 98 ], [ 100, 101 ], [ 103, 104 ], [ 106, 107 ], [ 109, 110 ], [ 112, 113 ], [ 115, 116 ], [ 118, 119 ], [ 121, 122 ], [ 124, 125 ], [ 127, 128 ] ]
[ "t = input()\n\nn = False\ns = False\ne = False\nw = False\n\nfor i in range(len(t)):\n n = n or t[i] == 'N'\n s = s or t[i] == 'S'\n e = e or t[i] == 'E'\n w = w or t[i] == 'W'\n\nok = True\nok = (n and s) or (not n and not s)\nok = ok and ((e and w) or (not e and not w))\nprint('Yes' if ok else 'No')", "t = input()", "t", "input()", "input", "n = False", "n", "False", "s = False", "s", "False", "e = False", "e", "False", "w = False", "w", "False", "for i in range(len(t)):\n n = n or t[i] == 'N'\n s = s or t[i] == 'S'\n e = e or t[i] == 'E'\n w = w or t[i] == 'W'", "i", "range(len(t))", "range", "len(t)", "len", "t", "n = n or t[i] == 'N'", "n", "n or t[i] == 'N'", "n", "t[i] == 'N'", "t[i]", "t", "i", "'N'", "s = s or t[i] == 'S'", "s", "s or t[i] == 'S'", "s", "t[i] == 'S'", "t[i]", "t", "i", "'S'", "e = e or t[i] == 'E'", "e", "e or t[i] == 'E'", "e", "t[i] == 'E'", "t[i]", "t", "i", "'E'", "w = w or t[i] == 'W'", "w", "w or t[i] == 'W'", "w", "t[i] == 'W'", "t[i]", "t", "i", "'W'", "ok = True", "ok", "True", "ok = (n and s) or (not n and not s)", "ok", "(n and s) or (not n and not s)", "n and s", "n", "s", "not n and not s", "not n", "n", "not s", "s", "ok = ok and ((e and w) or (not e and not w))", "ok", "ok and ((e and w) or (not e and not w))", "ok", "(e and w) or (not e and not w)", "e and w", "e", "w", "not e and not w", "not e", "e", "not w", "w", "print('Yes' if ok else 'No')", "print", "'Yes' if ok else 'No'", "ok", "'Yes'", "'No'", "t = input()", "input()", "t", "s = False", "False", "s", "w = False", "False", "w", "e = False", "False", "e", "ok = (n and s) or (not n and not s)", "(n and s) or (not n and not s)", "ok", "n = False", "False", "n", "w = w or t[i] == 'W'", "w or t[i] == 'W'", "w", "ok = True", "True", "ok", "e = e or t[i] == 'E'", "e or t[i] == 'E'", "e", "n = n or t[i] == 'N'", "n or t[i] == 'N'", "n", "s = s or t[i] == 'S'", "s or t[i] == 'S'", "s", "ok = ok and ((e and w) or (not e and not w))", "ok and ((e and w) or (not e and not w))", "ok" ]
t = input() n = False s = False e = False w = False for i in range(len(t)): n = n or t[i] == 'N' s = s or t[i] == 'S' e = e or t[i] == 'E' w = w or t[i] == 'W' ok = True ok = (n and s) or (not n and not s) ok = ok and ((e and w) or (not e and not w)) print('Yes' if ok else 'No')
[ 7, 0, 13, 4, 13, 4, 13, 14, 2, 2, 2, 17, 13, 2, 17, 13, 2, 2, 17, 13, 2, 17, 13, 4, 13, 17, 4, 13, 17, 10, 4, 13 ]
[ [ 30, 2 ], [ 31, 12 ], [ 31, 15 ], [ 31, 19 ], [ 31, 22 ], [ 30, 31 ] ]
[ "s = list(input())\nif ('N' in s) == ('S' in s) and ('E' in s) == ('W' in s):\n print('Yes')\nelse:\n print('No')", "s = list(input())", "s", "list(input())", "list", "input()", "input", "if ('N' in s) == ('S' in s) and ('E' in s) == ('W' in s):\n print('Yes')\nelse:\n print('No')", "('N' in s) == ('S' in s) and ('E' in s) == ('W' in s)", "('N' in s) == ('S' in s)", "'N' in s", "'N'", "s", "'S' in s", "'S'", "s", "('E' in s) == ('W' in s)", "'E' in s", "'E'", "s", "'W' in s", "'W'", "s", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "s = list(input())", "list(input())", "s" ]
s = list(input()) if ('N' in s) == ('S' in s) and ('E' in s) == ('W' in s): print('Yes') else: print('No')
[ 7, 15, 0, 13, 4, 13, 4, 13, 12, 13, 14, 2, 2, 2, 13, 17, 40, 13, 17, 2, 40, 13, 17, 2, 13, 17, 29, 17, 29, 17, 23, 13, 23, 13, 0, 13, 4, 13, 13, 14, 2, 4, 13, 18, 13, 17, 18, 13, 17, 4, 13, 18, 13, 17, 18, 13, 17, 4, 13, 17, 4, 13, 17, 10, 12, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 70, 3 ], [ 31, 14 ], [ 33, 17 ], [ 31, 21 ], [ 33, 24 ], [ 31, 31 ], [ 33, 33 ], [ 67, 35 ], [ 71, 38 ], [ 65, 42 ], [ 68, 44 ], [ 68, 47 ], [ 65, 50 ], [ 68, 52 ], [ 68, 55 ], [ 67, 68 ], [ 70, 71 ] ]
[ "from collections import Counter\nS = list(input())\ndef zeroandnot0(a, b):\n if (a == 0 and b != 0) or (a != 0 and b == 0):\n return True\n else:\n return False\nc = Counter(S)\nif zeroandnot0(c['E'], c['W']) or zeroandnot0(c['N'], c['S']):\n print('No')\nelse:\n print('Yes')", "from collections import Counter", "S = list(input())", "S", "list(input())", "list", "input()", "input", "def zeroandnot0(a, b):\n if (a == 0 and b != 0) or (a != 0 and b == 0):\n return True\n else:\n return False", "zeroandnot0", "if (a == 0 and b != 0) or (a != 0 and b == 0):\n return True\n else:\n return False", "(a == 0 and b != 0) or (a != 0 and b == 0)", "a == 0 and b != 0", "a == 0", "a", "0", "b != 0", "b", "0", "a != 0 and b == 0", "a != 0", "a", "0", "b == 0", "b", "0", "return True", "True", "return False", "False", "a", "a", "b", "b", "c = Counter(S)", "c", "Counter(S)", "Counter", "S", "if zeroandnot0(c['E'], c['W']) or zeroandnot0(c['N'], c['S']):\n print('No')\nelse:\n print('Yes')", "zeroandnot0(c['E'], c['W']) or zeroandnot0(c['N'], c['S'])", "zeroandnot0(c['E'], c['W'])", "zeroandnot0", "c['E']", "c", "'E'", "c['W']", "c", "'W'", "zeroandnot0(c['N'], c['S'])", "zeroandnot0", "c['N']", "c", "'N'", "c['S']", "c", "'S'", "print('No')", "print", "'No'", "print('Yes')", "print", "'Yes'", "def zeroandnot0(a, b):\n if (a == 0 and b != 0) or (a != 0 and b == 0):\n return True\n else:\n return False", "def zeroandnot0(a, b):\n if (a == 0 and b != 0) or (a != 0 and b == 0):\n return True\n else:\n return False", "zeroandnot0", "c = Counter(S)", "Counter(S)", "c", "S = list(input())", "list(input())", "S" ]
from collections import Counter S = list(input()) def zeroandnot0(a, b): if (a == 0 and b != 0) or (a != 0 and b == 0): return True else: return False c = Counter(S) if zeroandnot0(c['E'], c['W']) or zeroandnot0(c['N'], c['S']): print('No') else: print('Yes')
[ 7, 12, 13, 0, 13, 4, 13, 4, 13, 4, 13, 0, 13, 17, 14, 2, 4, 13, 13, 17, 0, 13, 17, 14, 2, 2, 2, 17, 13, 2, 2, 17, 13, 2, 17, 13, 2, 2, 17, 13, 2, 2, 17, 13, 2, 17, 13, 0, 13, 17, 14, 2, 4, 13, 13, 17, 0, 13, 17, 4, 13, 8, 13, 17, 17, 4, 13, 10, 12, 13 ]
[ [ 5, 4 ], [ 13, 12 ], [ 4, 18 ], [ 22, 21 ], [ 4, 28 ], [ 4, 32 ], [ 4, 35 ], [ 4, 39 ], [ 4, 43 ], [ 4, 46 ], [ 49, 48 ], [ 4, 54 ], [ 58, 57 ], [ 57, 62 ], [ 48, 62 ], [ 21, 62 ], [ 12, 62 ], [ 69, 66 ] ]
[ "def main():\n S=set(list(input()))\n flag=0\n if len(S)%2:\n flag=1\n if ('N' in S and ('W' in S or 'E' in S)) or ('S' in S and ('W' in S or 'E' in S)):\n flag=1\n if len(S)==4:\n flag=0\n print('No' if flag else 'Yes')\n\nmain()", "def main():\n S=set(list(input()))\n flag=0\n if len(S)%2:\n flag=1\n if ('N' in S and ('W' in S or 'E' in S)) or ('S' in S and ('W' in S or 'E' in S)):\n flag=1\n if len(S)==4:\n flag=0\n print('No' if flag else 'Yes')", "main", "S=set(list(input()))", "S", "set(list(input()))", "set", "list(input())", "list", "input()", "input", "flag=0", "flag", "0", "if len(S)%2:\n flag=1\n ", "len(S)%2", "len(S)", "len", "S", "2", "flag=1", "flag", "1", "if ('N' in S and ('W' in S or 'E' in S)) or ('S' in S and ('W' in S or 'E' in S)):\n flag=1\n ", "('N' in S and ('W' in S or 'E' in S)) or ('S' in S and ('W' in S or 'E' in S))", "'N' in S and ('W' in S or 'E' in S)", "'N' in S", "'N'", "S", "'W' in S or 'E' in S", "'W' in S", "'W'", "S", "'E' in S", "'E'", "S", "'S' in S and ('W' in S or 'E' in S)", "'S' in S", "'S'", "S", "'W' in S or 'E' in S", "'W' in S", "'W'", "S", "'E' in S", "'E'", "S", "flag=1", "flag", "1", "if len(S)==4:\n flag=0\n ", "len(S)==4", "len(S)", "len", "S", "4", "flag=0", "flag", "0", "print('No' if flag else 'Yes')", "print", "'No' if flag else 'Yes'", "flag", "'No'", "'Yes'", "main()", "main", "def main():\n S=set(list(input()))\n flag=0\n if len(S)%2:\n flag=1\n if ('N' in S and ('W' in S or 'E' in S)) or ('S' in S and ('W' in S or 'E' in S)):\n flag=1\n if len(S)==4:\n flag=0\n print('No' if flag else 'Yes')", "def main():\n S=set(list(input()))\n flag=0\n if len(S)%2:\n flag=1\n if ('N' in S and ('W' in S or 'E' in S)) or ('S' in S and ('W' in S or 'E' in S)):\n flag=1\n if len(S)==4:\n flag=0\n print('No' if flag else 'Yes')", "main" ]
def main(): S=set(list(input())) flag=0 if len(S)%2: flag=1 if ('N' in S and ('W' in S or 'E' in S)) or ('S' in S and ('W' in S or 'E' in S)): flag=1 if len(S)==4: flag=0 print('No' if flag else 'Yes') main()
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 14, 2, 2, 2, 40, 13, 17, 40, 13, 17, 2, 13, 17, 2, 13, 17, 4, 13, 17, 14, 2, 2, 2, 2, 13, 17, 2, 13, 17, 40, 13, 17, 40, 13, 17, 4, 13, 17, 14, 2, 2, 2, 40, 13, 17, 40, 13, 17, 40, 13, 17, 40, 13, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 99, 2 ], [ 96, 8 ], [ 100, 11 ], [ 102, 15 ], [ 100, 18 ], [ 108, 22 ], [ 100, 25 ], [ 105, 29 ], [ 100, 32 ], [ 97, 40 ], [ 103, 43 ], [ 109, 46 ], [ 106, 49 ], [ 97, 59 ], [ 103, 62 ], [ 109, 65 ], [ 106, 68 ], [ 97, 78 ], [ 103, 81 ], [ 109, 84 ], [ 106, 87 ], [ 96, 97 ], [ 99, 100 ], [ 102, 103 ], [ 105, 106 ], [ 108, 109 ] ]
[ "S = list(input())\n\nn = S.count(\"N\")\ns = S.count(\"S\")\ne = S.count(\"E\")\nw = S.count(\"W\")\n\nif n!=0 and s!=0 and e==0 and w==0:\n print(\"Yes\")\nelif n==0 and s==0 and e!=0 and w!=0:\n print(\"Yes\")\nelif n!=0 and s!=0 and e!=0 and w!=0:\n print(\"Yes\")\nelse:\n print(\"No\")", "S = list(input())", "S", "list(input())", "list", "input()", "input", "n = S.count(\"N\")", "n", "S.count(\"N\")", "S.count", "S", "count", "\"N\"", "s = S.count(\"S\")", "s", "S.count(\"S\")", "S.count", "S", "count", "\"S\"", "e = S.count(\"E\")", "e", "S.count(\"E\")", "S.count", "S", "count", "\"E\"", "w = S.count(\"W\")", "w", "S.count(\"W\")", "S.count", "S", "count", "\"W\"", "if n!=0 and s!=0 and e==0 and w==0:\n print(\"Yes\")\nelif n==0 and s==0 and e!=0 and w!=0:\n print(\"Yes\")\nelif n!=0 and s!=0 and e!=0 and w!=0:\n print(\"Yes\")\nelse:\n print(\"No\")", "n!=0 and s!=0 and e==0 and w==0", "n!=0 and s!=0 and e==0", "n!=0 and s!=0", "n!=0", "n", "0", "s!=0", "s", "0", "e==0", "e", "0", "w==0", "w", "0", "print(\"Yes\")", "print", "\"Yes\"", "elif n==0 and s==0 and e!=0 and w!=0:\n print(\"Yes\")", "n==0 and s==0 and e!=0 and w!=0", "n==0 and s==0 and e!=0", "n==0 and s==0", "n==0", "n", "0", "s==0", "s", "0", "e!=0", "e", "0", "w!=0", "w", "0", "print(\"Yes\")", "print", "\"Yes\"", "elif n!=0 and s!=0 and e!=0 and w!=0:\n print(\"Yes\")", "n!=0 and s!=0 and e!=0 and w!=0", "n!=0 and s!=0 and e!=0", "n!=0 and s!=0", "n!=0", "n", "0", "s!=0", "s", "0", "e!=0", "e", "0", "w!=0", "w", "0", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "n = S.count(\"N\")", "S.count(\"N\")", "n", "S = list(input())", "list(input())", "S", "s = S.count(\"S\")", "S.count(\"S\")", "s", "w = S.count(\"W\")", "S.count(\"W\")", "w", "e = S.count(\"E\")", "S.count(\"E\")", "e" ]
S = list(input()) n = S.count("N") s = S.count("S") e = S.count("E") w = S.count("W") if n!=0 and s!=0 and e==0 and w==0: print("Yes") elif n==0 and s==0 and e!=0 and w!=0: print("Yes") elif n!=0 and s!=0 and e!=0 and w!=0: print("Yes") else: print("No")
[ 7, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 0, 13, 17, 14, 2, 18, 13, 13, 17, 0, 13, 17, 14, 2, 18, 13, 13, 17, 0, 13, 17, 14, 2, 18, 13, 13, 17, 0, 13, 17, 14, 2, 2, 2, 2, 2, 40, 13, 17, 40, 13, 17, 40, 13, 17, 40, 13, 17, 2, 2, 2, 2, 13, 17, 2, 13, 17, 40, 13, 17, 40, 13, 17, 2, 2, 2, 40, 13, 17, 40, 13, 17, 2, 13, 17, 2, 13, 17, 4, 13, 17, 4, 13, 17, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 133, 2 ], [ 121, 6 ], [ 124, 9 ], [ 115, 12 ], [ 136, 15 ], [ 19, 18 ], [ 134, 23 ], [ 134, 27 ], [ 18, 28 ], [ 127, 31 ], [ 134, 36 ], [ 18, 37 ], [ 130, 40 ], [ 134, 45 ], [ 18, 46 ], [ 139, 49 ], [ 134, 54 ], [ 18, 55 ], [ 118, 58 ], [ 128, 67 ], [ 122, 67 ], [ 131, 70 ], [ 125, 70 ], [ 140, 73 ], [ 116, 73 ], [ 119, 76 ], [ 137, 76 ], [ 128, 82 ], [ 122, 82 ], [ 131, 85 ], [ 125, 85 ], [ 140, 88 ], [ 116, 88 ], [ 119, 91 ], [ 137, 91 ], [ 128, 97 ], [ 122, 97 ], [ 131, 100 ], [ 125, 100 ], [ 140, 103 ], [ 116, 103 ], [ 119, 106 ], [ 137, 106 ], [ 115, 116 ], [ 118, 119 ], [ 121, 122 ], [ 124, 125 ], [ 127, 128 ], [ 130, 131 ], [ 133, 134 ], [ 136, 137 ], [ 139, 140 ] ]
[ "S=input()\nn=0\ns=0\nw=0\ne=0\nfor i in range(len(S)):\n if S[i]==\"N\":\n n+=1\n if S[i]==\"S\":\n s+=1\n if S[i]==\"W\":\n w+=1\n if S[i]==\"E\":\n e+=1\n\nif n!=0 and s!=0 and w!=0 and e!=0 or n==0 and s==0 and w!=0 and e!=0 or n!=0 and s!=0 and w==0 and e==0:\n print(\"Yes\")\n\nelse:\n print(\"No\")\n ", "S=input()", "S", "input()", "input", "n=0", "n", "0", "s=0", "s", "0", "w=0", "w", "0", "e=0", "e", "0", "for i in range(len(S)):\n if S[i]==\"N\":\n n+=1\n if S[i]==\"S\":\n s+=1\n if S[i]==\"W\":\n w+=1\n if S[i]==\"E\":\n e+=1", "i", "range(len(S))", "range", "len(S)", "len", "S", "if S[i]==\"N\":\n n+=1\n ", "S[i]==\"N\"", "S[i]", "S", "i", "\"N\"", "n+=1", "n", "1", "if S[i]==\"S\":\n s+=1\n ", "S[i]==\"S\"", "S[i]", "S", "i", "\"S\"", "s+=1", "s", "1", "if S[i]==\"W\":\n w+=1\n ", "S[i]==\"W\"", "S[i]", "S", "i", "\"W\"", "w+=1", "w", "1", "if S[i]==\"E\":\n e+=1", "S[i]==\"E\"", "S[i]", "S", "i", "\"E\"", "e+=1", "e", "1", "if n!=0 and s!=0 and w!=0 and e!=0 or n==0 and s==0 and w!=0 and e!=0 or n!=0 and s!=0 and w==0 and e==0:\n print(\"Yes\")\n\nelse:\n print(\"No\")\n ", "n!=0 and s!=0 and w!=0 and e!=0 or n==0 and s==0 and w!=0 and e!=0 or n!=0 and s!=0 and w==0 and e==0", "n!=0 and s!=0 and w!=0 and e!=0 or n==0 and s==0 and w!=0 and e!=0", "n!=0 and s!=0 and w!=0 and e!=0", "n!=0 and s!=0 and w!=0", "n!=0 and s!=0", "n!=0", "n", "0", "s!=0", "s", "0", "w!=0", "w", "0", "e!=0", "e", "0", "n==0 and s==0 and w!=0 and e!=0", "n==0 and s==0 and w!=0", "n==0 and s==0", "n==0", "n", "0", "s==0", "s", "0", "w!=0", "w", "0", "e!=0", "e", "0", "n!=0 and s!=0 and w==0 and e==0", "n!=0 and s!=0 and w==0", "n!=0 and s!=0", "n!=0", "n", "0", "s!=0", "s", "0", "w==0", "w", "0", "e==0", "e", "0", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "w=0", "0", "w", "e+=1", "1", "e", "n=0", "0", "n", "s=0", "0", "s", "n+=1", "1", "n", "s+=1", "1", "s", "S=input()", "input()", "S", "e=0", "0", "e", "w+=1", "1", "w" ]
S=input() n=0 s=0 w=0 e=0 for i in range(len(S)): if S[i]=="N": n+=1 if S[i]=="S": s+=1 if S[i]=="W": w+=1 if S[i]=="E": e+=1 if n!=0 and s!=0 and w!=0 and e!=0 or n==0 and s==0 and w!=0 and e!=0 or n!=0 and s!=0 and w==0 and e==0: print("Yes") else: print("No")
[ 7, 0, 13, 4, 13, 0, 13, 17, 14, 2, 2, 17, 13, 40, 2, 17, 13, 0, 13, 17, 14, 2, 2, 17, 13, 40, 2, 17, 13, 0, 13, 17, 14, 2, 2, 17, 13, 40, 2, 17, 13, 0, 13, 17, 14, 2, 2, 17, 13, 40, 2, 17, 13, 0, 13, 17, 4, 13, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13 ]
[ [ 75, 2 ], [ 63, 6 ], [ 76, 12 ], [ 76, 16 ], [ 69, 18 ], [ 76, 24 ], [ 76, 28 ], [ 72, 30 ], [ 76, 36 ], [ 76, 40 ], [ 60, 42 ], [ 76, 48 ], [ 76, 52 ], [ 66, 54 ], [ 67, 58 ], [ 61, 58 ], [ 73, 58 ], [ 70, 58 ], [ 64, 58 ], [ 60, 61 ], [ 63, 64 ], [ 66, 67 ], [ 69, 70 ], [ 72, 73 ], [ 75, 76 ] ]
[ "S=input()\nans=\"Yes\"\nif \"N\" in S and not \"S\" in S:\n ans=\"No\"\nif \"S\" in S and not \"N\" in S:\n ans=\"No\"\nif \"E\" in S and not \"W\" in S:\n ans=\"No\"\nif \"W\" in S and not \"E\" in S:\n ans=\"No\"\nprint(ans)", "S=input()", "S", "input()", "input", "ans=\"Yes\"", "ans", "\"Yes\"", "if \"N\" in S and not \"S\" in S:\n ans=\"No\"", "\"N\" in S and not \"S\" in S", "\"N\" in S", "\"N\"", "S", "not \"S\" in S", "\"S\" in S", "\"S\"", "S", "ans=\"No\"", "ans", "\"No\"", "if \"S\" in S and not \"N\" in S:\n ans=\"No\"", "\"S\" in S and not \"N\" in S", "\"S\" in S", "\"S\"", "S", "not \"N\" in S", "\"N\" in S", "\"N\"", "S", "ans=\"No\"", "ans", "\"No\"", "if \"E\" in S and not \"W\" in S:\n ans=\"No\"", "\"E\" in S and not \"W\" in S", "\"E\" in S", "\"E\"", "S", "not \"W\" in S", "\"W\" in S", "\"W\"", "S", "ans=\"No\"", "ans", "\"No\"", "if \"W\" in S and not \"E\" in S:\n ans=\"No\"", "\"W\" in S and not \"E\" in S", "\"W\" in S", "\"W\"", "S", "not \"E\" in S", "\"E\" in S", "\"E\"", "S", "ans=\"No\"", "ans", "\"No\"", "print(ans)", "print", "ans", "ans=\"No\"", "\"No\"", "ans", "ans=\"Yes\"", "\"Yes\"", "ans", "ans=\"No\"", "\"No\"", "ans", "ans=\"No\"", "\"No\"", "ans", "ans=\"No\"", "\"No\"", "ans", "S=input()", "input()", "S" ]
S=input() ans="Yes" if "N" in S and not "S" in S: ans="No" if "S" in S and not "N" in S: ans="No" if "E" in S and not "W" in S: ans="No" if "W" in S and not "E" in S: ans="No" print(ans)
[ 7, 0, 13, 4, 13, 0, 13, 2, 17, 13, 13, 2, 17, 13, 13, 2, 17, 13, 13, 2, 17, 13, 0, 13, 40, 2, 13, 13, 0, 13, 40, 2, 13, 13, 0, 13, 8, 2, 13, 13, 17, 17, 4, 13, 13, 10, 8, 13, 10, 2, 13, 10, 2, 13, 10, 40, 13, 10, 2, 13, 10, 2, 13, 10, 40, 13, 10, 4, 13 ]
[ [ 67, 2 ], [ 52, 6 ], [ 68, 9 ], [ 49, 10 ], [ 68, 13 ], [ 61, 14 ], [ 68, 17 ], [ 58, 18 ], [ 68, 21 ], [ 55, 23 ], [ 53, 26 ], [ 62, 27 ], [ 64, 29 ], [ 50, 32 ], [ 59, 33 ], [ 46, 35 ], [ 56, 38 ], [ 65, 39 ], [ 47, 44 ], [ 46, 47 ], [ 49, 50 ], [ 52, 53 ], [ 55, 56 ], [ 58, 59 ], [ 61, 62 ], [ 64, 65 ], [ 67, 68 ] ]
[ "S=input()\n\nn,w,s,e='N' in S,'W' in S,'S' in S,'E' in S\n\ncand1=not n^s\ncand2=not w^e\n\nans=\"Yes\" if cand1 and cand2 else \"No\"\nprint(ans)", "S=input()", "S", "input()", "input", "n,w,s,e='N' in S,'W' in S,'S' in S,'E' in S", "n", "'N' in S", "'N'", "S", "w", "'W' in S", "'W'", "S", "s", "'S' in S", "'S'", "S", "e", "'E' in S", "'E'", "S", "cand1=not n^s", "cand1", "not n^s", "n^s", "n", "s", "cand2=not w^e", "cand2", "not w^e", "w^e", "w", "e", "ans=\"Yes\" if cand1 and cand2 else \"No\"", "ans", "\"Yes\" if cand1 and cand2 else \"No\"", "cand1 and cand2", "cand1", "cand2", "\"Yes\"", "\"No\"", "print(ans)", "print", "ans", "ans=\"Yes\" if cand1 and cand2 else \"No\"", "\"Yes\" if cand1 and cand2 else \"No\"", "ans", "w,s,e='N' in S,'W' in S,'S' in S,'E' in S", "'W' in S", "w", "n,w,s,e='N' in S,'W' in S,'S' in S,'E' in S", "'N' in S", "n", "cand1=not n^s", "not n^s", "cand1", "e='N' in S,'W' in S,'S' in S,'E' in S", "'E' in S", "e", "s,e='N' in S,'W' in S,'S' in S,'E' in S", "'S' in S", "s", "cand2=not w^e", "not w^e", "cand2", "S=input()", "input()", "S" ]
S=input() n,w,s,e='N' in S,'W' in S,'S' in S,'E' in S cand1=not n^s cand2=not w^e ans="Yes" if cand1 and cand2 else "No" print(ans)
[ 7, 0, 13, 4, 13, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 17, 14, 2, 2, 2, 2, 13, 17, 2, 13, 17, 2, 13, 17, 2, 13, 17, 0, 13, 17, 14, 2, 2, 2, 2, 13, 17, 2, 13, 17, 2, 13, 17, 2, 13, 17, 0, 13, 17, 14, 2, 2, 2, 2, 13, 17, 2, 13, 17, 2, 13, 17, 2, 13, 17, 0, 13, 17, 0, 13, 17, 4, 13, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13 ]
[ [ 118, 2 ], [ 121, 6 ], [ 119, 9 ], [ 127, 13 ], [ 119, 16 ], [ 112, 20 ], [ 119, 23 ], [ 109, 27 ], [ 119, 30 ], [ 103, 34 ], [ 122, 41 ], [ 128, 44 ], [ 113, 47 ], [ 110, 50 ], [ 106, 53 ], [ 122, 60 ], [ 128, 63 ], [ 113, 66 ], [ 110, 69 ], [ 115, 72 ], [ 122, 79 ], [ 128, 82 ], [ 113, 85 ], [ 110, 88 ], [ 124, 91 ], [ 100, 94 ], [ 101, 98 ], [ 125, 98 ], [ 116, 98 ], [ 107, 98 ], [ 104, 98 ], [ 100, 101 ], [ 103, 104 ], [ 106, 107 ], [ 109, 110 ], [ 112, 113 ], [ 115, 116 ], [ 118, 119 ], [ 121, 122 ], [ 124, 125 ], [ 127, 128 ] ]
[ "s = input()\nN = s.count('N')\nW = s.count('W')\nS = s.count('S')\nE = s.count('E')\nans = ''\nif N > 0 and W > 0 and S > 0 and E > 0:\n ans = 'Yes'\nelif N == 0 and W > 0 and S == 0 and E > 0:\n ans = 'Yes'\nelif N > 0 and W == 0 and S > 0 and E == 0:\n ans = 'Yes'\nelse:\n ans = 'No'\nprint(ans)", "s = input()", "s", "input()", "input", "N = s.count('N')", "N", "s.count('N')", "s.count", "s", "count", "'N'", "W = s.count('W')", "W", "s.count('W')", "s.count", "s", "count", "'W'", "S = s.count('S')", "S", "s.count('S')", "s.count", "s", "count", "'S'", "E = s.count('E')", "E", "s.count('E')", "s.count", "s", "count", "'E'", "ans = ''", "ans", "''", "if N > 0 and W > 0 and S > 0 and E > 0:\n ans = 'Yes'\nelif N == 0 and W > 0 and S == 0 and E > 0:\n ans = 'Yes'\nelif N > 0 and W == 0 and S > 0 and E == 0:\n ans = 'Yes'\nelse:\n ans = 'No'", "N > 0 and W > 0 and S > 0 and E > 0", "N > 0 and W > 0 and S > 0", "N > 0 and W > 0", "N > 0", "N", "0", "W > 0", "W", "0", "S > 0", "S", "0", "E > 0", "E", "0", "ans = 'Yes'", "ans", "'Yes'", "elif N == 0 and W > 0 and S == 0 and E > 0:\n ans = 'Yes'", "N == 0 and W > 0 and S == 0 and E > 0", "N == 0 and W > 0 and S == 0", "N == 0 and W > 0", "N == 0", "N", "0", "W > 0", "W", "0", "S == 0", "S", "0", "E > 0", "E", "0", "ans = 'Yes'", "ans", "'Yes'", "elif N > 0 and W == 0 and S > 0 and E == 0:\n ans = 'Yes'", "N > 0 and W == 0 and S > 0 and E == 0", "N > 0 and W == 0 and S > 0", "N > 0 and W == 0", "N > 0", "N", "0", "W == 0", "W", "0", "S > 0", "S", "0", "E == 0", "E", "0", "ans = 'Yes'", "ans", "'Yes'", "ans = 'No'", "ans", "'No'", "print(ans)", "print", "ans", "ans = 'No'", "'No'", "ans", "ans = ''", "''", "ans", "ans = 'Yes'", "'Yes'", "ans", "E = s.count('E')", "s.count('E')", "E", "S = s.count('S')", "s.count('S')", "S", "ans = 'Yes'", "'Yes'", "ans", "s = input()", "input()", "s", "N = s.count('N')", "s.count('N')", "N", "ans = 'Yes'", "'Yes'", "ans", "W = s.count('W')", "s.count('W')", "W" ]
s = input() N = s.count('N') W = s.count('W') S = s.count('S') E = s.count('E') ans = '' if N > 0 and W > 0 and S > 0 and E > 0: ans = 'Yes' elif N == 0 and W > 0 and S == 0 and E > 0: ans = 'Yes' elif N > 0 and W == 0 and S > 0 and E == 0: ans = 'Yes' else: ans = 'No' print(ans)
[ 7, 15, 13, 0, 13, 12, 4, 18, 4, 18, 18, 13, 13, 13, 13, 4, 18, 13, 13, 4, 13, 17, 2, 17, 17, 0, 13, 12, 4, 18, 18, 13, 13, 13, 2, 13, 17, 23, 0, 13, 4, 13, 0, 13, 2, 2, 17, 13, 2, 17, 13, 0, 13, 2, 2, 17, 13, 2, 17, 13, 14, 2, 2, 13, 17, 2, 13, 17, 0, 13, 17, 0, 13, 17, 4, 13, 13, 10, 17, 13, 10, 2, 13, 10, 12, 13, 10, 2, 13, 10, 4, 13, 10, 12, 13, 10, 17, 13 ]
[ [ 93, 4 ], [ 84, 26 ], [ 90, 39 ], [ 94, 41 ], [ 87, 43 ], [ 91, 47 ], [ 91, 50 ], [ 81, 52 ], [ 91, 56 ], [ 91, 59 ], [ 88, 63 ], [ 82, 66 ], [ 96, 69 ], [ 78, 72 ], [ 79, 76 ], [ 97, 76 ], [ 78, 79 ], [ 81, 82 ], [ 84, 85 ], [ 87, 88 ], [ 90, 91 ], [ 93, 94 ], [ 96, 97 ] ]
[ "import sys\ninput = lambda : sys.stdin.readline().rstrip()\nsys.setrecursionlimit(max(1000, 10**9))\nwrite = lambda x: sys.stdout.write(x+\"\\n\")\n\n\ns = input()\nv1 = (\"N\" in s) + (\"S\" in s)\nv2 = (\"W\" in s) + (\"E\" in s)\nif v1==1 or v2==1:\n ans = \"No\"\nelse:\n ans = \"Yes\"\nprint(ans)", "import sys", "sys", "input = lambda : sys.stdin.readline().rstrip()", "input", "lambda : sys.stdin.readline().rstrip()", "sys.stdin.readline().rstrip()", "sys.stdin.readline().rstrip", "sys.stdin.readline()", "sys.stdin.readline", "sys.stdin", "sys", "stdin", "readline", "rstrip", "sys.setrecursionlimit(max(1000, 10**9))", "sys.setrecursionlimit", "sys", "setrecursionlimit", "max(1000, 10**9)", "max", "1000", "10**9", "10", "9", "write = lambda x: sys.stdout.write(x+\"\\n\")", "write", "lambda x: sys.stdout.write(x+\"\\n\")", "sys.stdout.write(x+\"\\n\")", "sys.stdout.write", "sys.stdout", "sys", "stdout", "write", "x+\"\\n\"", "x", "\"\\n\"", "x", "s = input()", "s", "input()", "input", "v1 = (\"N\" in s) + (\"S\" in s)", "v1", "(\"N\" in s) + (\"S\" in s)", "\"N\" in s", "\"N\"", "s", "\"S\" in s", "\"S\"", "s", "v2 = (\"W\" in s) + (\"E\" in s)", "v2", "(\"W\" in s) + (\"E\" in s)", "\"W\" in s", "\"W\"", "s", "\"E\" in s", "\"E\"", "s", "if v1==1 or v2==1:\n ans = \"No\"\nelse:\n ans = \"Yes\"", "v1==1 or v2==1", "v1==1", "v1", "1", "v2==1", "v2", "1", "ans = \"No\"", "ans", "\"No\"", "ans = \"Yes\"", "ans", "\"Yes\"", "print(ans)", "print", "ans", "ans = \"Yes\"", "\"Yes\"", "ans", "v2 = (\"W\" in s) + (\"E\" in s)", "(\"W\" in s) + (\"E\" in s)", "v2", "write = lambda x: sys.stdout.write(x+\"\\n\")", "lambda x: sys.stdout.write(x+\"\\n\")", "write", "v1 = (\"N\" in s) + (\"S\" in s)", "(\"N\" in s) + (\"S\" in s)", "v1", "s = input()", "input()", "s", "input = lambda : sys.stdin.readline().rstrip()", "lambda : sys.stdin.readline().rstrip()", "input", "ans = \"No\"", "\"No\"", "ans" ]
import sys input = lambda : sys.stdin.readline().rstrip() sys.setrecursionlimit(max(1000, 10**9)) write = lambda x: sys.stdout.write(x+"\n") s = input() v1 = ("N" in s) + ("S" in s) v2 = ("W" in s) + ("E" in s) if v1==1 or v2==1: ans = "No" else: ans = "Yes" print(ans)
[ 7, 15, 0, 13, 4, 13, 0, 13, 4, 13, 13, 28, 13, 13, 0, 18, 13, 13, 17, 14, 2, 2, 18, 13, 17, 18, 13, 17, 2, 18, 13, 17, 18, 13, 17, 4, 13, 17, 14, 2, 2, 18, 13, 17, 18, 13, 17, 40, 2, 18, 13, 17, 18, 13, 17, 4, 13, 17, 14, 2, 40, 2, 18, 13, 17, 18, 13, 17, 2, 18, 13, 17, 18, 13, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13 ]
[ [ 82, 3 ], [ 85, 7 ], [ 13, 12 ], [ 83, 12 ], [ 18, 15 ], [ 86, 16 ], [ 12, 17 ], [ 86, 23 ], [ 86, 26 ], [ 86, 30 ], [ 86, 33 ], [ 86, 42 ], [ 86, 45 ], [ 86, 50 ], [ 86, 53 ], [ 86, 63 ], [ 86, 66 ], [ 86, 70 ], [ 86, 73 ], [ 82, 83 ], [ 85, 86 ] ]
[ "from collections import defaultdict\n\nS = input()\n\ncnt = defaultdict(bool)\nfor s in S:\n cnt[s] = True\n\nif (cnt[\"S\"] and cnt[\"N\"]) and (cnt[\"E\"] and cnt[\"W\"]):\n print(\"Yes\")\nelif (cnt[\"S\"] and cnt[\"N\"]) and not (cnt[\"E\"] or cnt[\"W\"]):\n print(\"Yes\")\nelif not (cnt[\"S\"] or cnt[\"N\"]) and (cnt[\"E\"] and cnt[\"W\"]):\n print(\"Yes\")\nelse:\n print(\"No\")", "from collections import defaultdict", "S = input()", "S", "input()", "input", "cnt = defaultdict(bool)", "cnt", "defaultdict(bool)", "defaultdict", "bool", "for s in S:\n cnt[s] = True", "s", "S", "cnt[s] = True", "cnt[s]", "cnt", "s", "True", "if (cnt[\"S\"] and cnt[\"N\"]) and (cnt[\"E\"] and cnt[\"W\"]):\n print(\"Yes\")\nelif (cnt[\"S\"] and cnt[\"N\"]) and not (cnt[\"E\"] or cnt[\"W\"]):\n print(\"Yes\")\nelif not (cnt[\"S\"] or cnt[\"N\"]) and (cnt[\"E\"] and cnt[\"W\"]):\n print(\"Yes\")\nelse:\n print(\"No\")", "(cnt[\"S\"] and cnt[\"N\"]) and (cnt[\"E\"] and cnt[\"W\"])", "cnt[\"S\"] and cnt[\"N\"]", "cnt[\"S\"]", "cnt", "\"S\"", "cnt[\"N\"]", "cnt", "\"N\"", "cnt[\"E\"] and cnt[\"W\"]", "cnt[\"E\"]", "cnt", "\"E\"", "cnt[\"W\"]", "cnt", "\"W\"", "print(\"Yes\")", "print", "\"Yes\"", "elif (cnt[\"S\"] and cnt[\"N\"]) and not (cnt[\"E\"] or cnt[\"W\"]):\n print(\"Yes\")", "(cnt[\"S\"] and cnt[\"N\"]) and not (cnt[\"E\"] or cnt[\"W\"])", "cnt[\"S\"] and cnt[\"N\"]", "cnt[\"S\"]", "cnt", "\"S\"", "cnt[\"N\"]", "cnt", "\"N\"", "not (cnt[\"E\"] or cnt[\"W\"])", "cnt[\"E\"] or cnt[\"W\"]", "cnt[\"E\"]", "cnt", "\"E\"", "cnt[\"W\"]", "cnt", "\"W\"", "print(\"Yes\")", "print", "\"Yes\"", "elif not (cnt[\"S\"] or cnt[\"N\"]) and (cnt[\"E\"] and cnt[\"W\"]):\n print(\"Yes\")", "not (cnt[\"S\"] or cnt[\"N\"]) and (cnt[\"E\"] and cnt[\"W\"])", "not (cnt[\"S\"] or cnt[\"N\"])", "cnt[\"S\"] or cnt[\"N\"]", "cnt[\"S\"]", "cnt", "\"S\"", "cnt[\"N\"]", "cnt", "\"N\"", "cnt[\"E\"] and cnt[\"W\"]", "cnt[\"E\"]", "cnt", "\"E\"", "cnt[\"W\"]", "cnt", "\"W\"", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "S = input()", "input()", "S", "cnt = defaultdict(bool)", "defaultdict(bool)", "cnt" ]
from collections import defaultdict S = input() cnt = defaultdict(bool) for s in S: cnt[s] = True if (cnt["S"] and cnt["N"]) and (cnt["E"] and cnt["W"]): print("Yes") elif (cnt["S"] and cnt["N"]) and not (cnt["E"] or cnt["W"]): print("Yes") elif not (cnt["S"] or cnt["N"]) and (cnt["E"] and cnt["W"]): print("Yes") else: print("No")
[ 7, 15, 13, 0, 13, 18, 18, 13, 13, 13, 0, 13, 2, 2, 17, 17, 17, 0, 13, 4, 13, 17, 4, 18, 13, 13, 2, 17, 17, 12, 13, 0, 13, 4, 13, 0, 13, 39, 17, 17, 17, 14, 2, 4, 13, 13, 13, 4, 13, 17, 4, 13, 17, 14, 2, 13, 17, 4, 13, 10, 2, 13, 10, 18, 13, 10, 4, 13, 10, 12, 13 ]
[ [ 63, 4 ], [ 60, 11 ], [ 66, 18 ], [ 33, 32 ], [ 37, 36 ], [ 32, 45 ], [ 36, 46 ], [ 70, 58 ], [ 60, 61 ], [ 63, 64 ], [ 66, 67 ] ]
[ "import sys\n\nreadline = sys.stdin.readline\nMOD = 10 ** 9 + 7\nINF = float('INF')\nsys.setrecursionlimit(10 ** 5)\n\n\ndef main():\n s = input()\n ok = [{\"N\", \"S\"}, {\"E\", \"W\"}, {\"N\", \"S\", \"E\", \"W\"}]\n if set(s) in ok:\n print(\"Yes\")\n else:\n print(\"No\")\n\n\nif __name__ == '__main__':\n main()", "import sys", "sys", "readline = sys.stdin.readline", "readline", "sys.stdin.readline", "sys.stdin", "sys", "stdin", "readline", "MOD = 10 ** 9 + 7", "MOD", "10 ** 9 + 7", "10 ** 9", "10", "9", "7", "INF = float('INF')", "INF", "float('INF')", "float", "'INF'", "sys.setrecursionlimit(10 ** 5)", "sys.setrecursionlimit", "sys", "setrecursionlimit", "10 ** 5", "10", "5", "def main():\n s = input()\n ok = [{\"N\", \"S\"}, {\"E\", \"W\"}, {\"N\", \"S\", \"E\", \"W\"}]\n if set(s) in ok:\n print(\"Yes\")\n else:\n print(\"No\")", "main", "s = input()", "s", "input()", "input", "ok = [{\"N\", \"S\"}, {\"E\", \"W\"}, {\"N\", \"S\", \"E\", \"W\"}]", "ok", "[{\"N\", \"S\"}, {\"E\", \"W\"}, {\"N\", \"S\", \"E\", \"W\"}]", "{\"N\", \"S\"}", "{\"E\", \"W\"}", "{\"N\", \"S\", \"E\", \"W\"}", "if set(s) in ok:\n print(\"Yes\")\n else:\n print(\"No\")", "set(s) in ok", "set(s)", "set", "s", "ok", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "if __name__ == '__main__':\n main()", "__name__ == '__main__'", "__name__", "'__main__'", "main()", "main", "MOD = 10 ** 9 + 7", "10 ** 9 + 7", "MOD", "readline = sys.stdin.readline", "sys.stdin.readline", "readline", "INF = float('INF')", "float('INF')", "INF", "def main():\n s = input()\n ok = [{\"N\", \"S\"}, {\"E\", \"W\"}, {\"N\", \"S\", \"E\", \"W\"}]\n if set(s) in ok:\n print(\"Yes\")\n else:\n print(\"No\")", "def main():\n s = input()\n ok = [{\"N\", \"S\"}, {\"E\", \"W\"}, {\"N\", \"S\", \"E\", \"W\"}]\n if set(s) in ok:\n print(\"Yes\")\n else:\n print(\"No\")", "main" ]
import sys readline = sys.stdin.readline MOD = 10 ** 9 + 7 INF = float('INF') sys.setrecursionlimit(10 ** 5) def main(): s = input() ok = [{"N", "S"}, {"E", "W"}, {"N", "S", "E", "W"}] if set(s) in ok: print("Yes") else: print("No") if __name__ == '__main__': main()
[ 7, 0, 13, 4, 13, 4, 13, 4, 13, 4, 13, 8, 2, 2, 4, 13, 13, 17, 2, 2, 4, 13, 13, 17, 2, 4, 18, 13, 13, 17, 4, 18, 13, 13, 17, 17, 17, 10, 4, 13 ]
[ [ 38, 2 ], [ 39, 16 ], [ 39, 22 ], [ 39, 27 ], [ 39, 32 ], [ 38, 39 ] ]
[ "S=list(set(input()))\nprint(\"Yes\" if len(S)==4 or (len(S)==2 and S.count(\"N\")==S.count(\"S\")) else \"No\")", "S=list(set(input()))", "S", "list(set(input()))", "list", "set(input())", "set", "input()", "input", "print(\"Yes\" if len(S)==4 or (len(S)==2 and S.count(\"N\")==S.count(\"S\")) else \"No\")", "print", "\"Yes\" if len(S)==4 or (len(S)==2 and S.count(\"N\")==S.count(\"S\")) else \"No\"", "len(S)==4 or (len(S)==2 and S.count(\"N\")==S.count(\"S\"))", "len(S)==4", "len(S)", "len", "S", "4", "len(S)==2 and S.count(\"N\")==S.count(\"S\")", "len(S)==2", "len(S)", "len", "S", "2", "S.count(\"N\")==S.count(\"S\")", "S.count(\"N\")", "S.count", "S", "count", "\"N\"", "S.count(\"S\")", "S.count", "S", "count", "\"S\"", "\"Yes\"", "\"No\"", "S=list(set(input()))", "list(set(input()))", "S" ]
S=list(set(input())) print("Yes" if len(S)==4 or (len(S)==2 and S.count("N")==S.count("S")) else "No")
[ 7, 0, 13, 4, 13, 4, 13, 13, 4, 13, 0, 13, 17, 0, 13, 17, 14, 2, 2, 2, 2, 17, 13, 2, 17, 13, 40, 2, 17, 13, 40, 2, 17, 13, 4, 13, 17, 4, 13, 14, 2, 2, 2, 2, 17, 13, 2, 17, 13, 40, 2, 17, 13, 40, 2, 17, 13, 4, 13, 17, 4, 13, 28, 13, 4, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 0, 13, 2, 13, 17, 14, 2, 18, 13, 13, 17, 0, 13, 2, 13, 17, 14, 2, 18, 13, 13, 17, 0, 13, 2, 13, 17, 14, 2, 18, 13, 13, 17, 0, 13, 2, 13, 17, 14, 2, 2, 13, 17, 2, 13, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 17, 13, 10, 2, 13, 10, 17, 13, 10, 2, 13, 10, 2, 13, 10, 2, 13 ]
[ [ 128, 2 ], [ 137, 11 ], [ 131, 14 ], [ 129, 22 ], [ 129, 25 ], [ 129, 29 ], [ 129, 33 ], [ 129, 45 ], [ 129, 48 ], [ 129, 52 ], [ 129, 56 ], [ 64, 63 ], [ 129, 68 ], [ 129, 72 ], [ 63, 73 ], [ 134, 76 ], [ 138, 78 ], [ 141, 78 ], [ 135, 78 ], [ 129, 83 ], [ 63, 84 ], [ 140, 87 ], [ 138, 89 ], [ 141, 89 ], [ 135, 89 ], [ 129, 94 ], [ 63, 95 ], [ 143, 98 ], [ 132, 100 ], [ 147, 100 ], [ 144, 100 ], [ 129, 105 ], [ 63, 106 ], [ 146, 109 ], [ 132, 111 ], [ 147, 111 ], [ 144, 111 ], [ 141, 116 ], [ 135, 116 ], [ 138, 116 ], [ 147, 119 ], [ 144, 119 ], [ 132, 119 ], [ 128, 129 ], [ 131, 132 ], [ 134, 135 ], [ 137, 138 ], [ 140, 141 ], [ 143, 144 ], [ 146, 147 ] ]
[ "li = list(map(str, input()))\nx=0\ny=0\n\nif 'N' in li and 'S' in li and not 'E' in li and not 'W' in li:\n print('Yes')\n exit()\n \nif 'E' in li and 'W' in li and not 'S' in li and not 'N' in li:\n print('Yes')\n exit()\n\nfor i in range(len(li)):\n if li[i]=='N':\n x=x+1\n elif li[i]=='S':\n x=x-1\n elif li[i]=='E':\n y=y+1\n elif li[i]=='W':\n y=y-1\n\nif x==0 and y==0:\n print('Yes')\nelse:\n print('No')", "li = list(map(str, input()))", "li", "list(map(str, input()))", "list", "map(str, input())", "map", "str", "input()", "input", "x=0", "x", "0", "y=0", "y", "0", "if 'N' in li and 'S' in li and not 'E' in li and not 'W' in li:\n print('Yes')\n exit()\n ", "'N' in li and 'S' in li and not 'E' in li and not 'W' in li", "'N' in li and 'S' in li and not 'E' in li", "'N' in li and 'S' in li", "'N' in li", "'N'", "li", "'S' in li", "'S'", "li", "not 'E' in li", "'E' in li", "'E'", "li", "not 'W' in li", "'W' in li", "'W'", "li", "print('Yes')", "print", "'Yes'", "exit()", "exit", "if 'E' in li and 'W' in li and not 'S' in li and not 'N' in li:\n print('Yes')\n exit()", "'E' in li and 'W' in li and not 'S' in li and not 'N' in li", "'E' in li and 'W' in li and not 'S' in li", "'E' in li and 'W' in li", "'E' in li", "'E'", "li", "'W' in li", "'W'", "li", "not 'S' in li", "'S' in li", "'S'", "li", "not 'N' in li", "'N' in li", "'N'", "li", "print('Yes')", "print", "'Yes'", "exit()", "exit", "for i in range(len(li)):\n if li[i]=='N':\n x=x+1\n elif li[i]=='S':\n x=x-1\n elif li[i]=='E':\n y=y+1\n elif li[i]=='W':\n y=y-1", "i", "range(len(li))", "range", "len(li)", "len", "li", "if li[i]=='N':\n x=x+1\n elif li[i]=='S':\n x=x-1\n elif li[i]=='E':\n y=y+1\n elif li[i]=='W':\n y=y-1", "li[i]=='N'", "li[i]", "li", "i", "'N'", "x=x+1", "x", "x+1", "x", "1", "elif li[i]=='S':\n x=x-1\n ", "li[i]=='S'", "li[i]", "li", "i", "'S'", "x=x-1", "x", "x-1", "x", "1", "elif li[i]=='E':\n y=y+1\n ", "li[i]=='E'", "li[i]", "li", "i", "'E'", "y=y+1", "y", "y+1", "y", "1", "elif li[i]=='W':\n y=y-1", "li[i]=='W'", "li[i]", "li", "i", "'W'", "y=y-1", "y", "y-1", "y", "1", "if x==0 and y==0:\n print('Yes')\nelse:\n print('No')", "x==0 and y==0", "x==0", "x", "0", "y==0", "y", "0", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "li = list(map(str, input()))", "list(map(str, input()))", "li", "y=0", "0", "y", "x=x+1", "x+1", "x", "x=0", "0", "x", "x=x-1", "x-1", "x", "y=y+1", "y+1", "y", "y=y-1", "y-1", "y" ]
li = list(map(str, input())) x=0 y=0 if 'N' in li and 'S' in li and not 'E' in li and not 'W' in li: print('Yes') exit() if 'E' in li and 'W' in li and not 'S' in li and not 'N' in li: print('Yes') exit() for i in range(len(li)): if li[i]=='N': x=x+1 elif li[i]=='S': x=x-1 elif li[i]=='E': y=y+1 elif li[i]=='W': y=y-1 if x==0 and y==0: print('Yes') else: print('No')
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 39, 0, 13, 39, 28, 13, 13, 14, 2, 2, 13, 17, 2, 13, 17, 4, 18, 13, 13, 13, 4, 18, 13, 13, 13, 14, 2, 2, 4, 13, 4, 13, 13, 17, 2, 4, 13, 4, 13, 13, 17, 4, 13, 17, 4, 13, 17, 10, 39, 13, 10, 4, 13, 10, 39, 13 ]
[ [ 60, 2 ], [ 63, 8 ], [ 57, 11 ], [ 15, 14 ], [ 61, 14 ], [ 14, 19 ], [ 14, 22 ], [ 64, 26 ], [ 14, 28 ], [ 58, 31 ], [ 14, 33 ], [ 64, 41 ], [ 58, 48 ], [ 57, 58 ], [ 60, 61 ], [ 63, 64 ] ]
[ "s = list(input())\new = []\nsn = []\nfor i in s:\n if i == \"E\" or i == \"W\":\n ew.append(i)\n else:\n sn.append(i)\nif len(set(ew)) == 1 or len(set(sn)) == 1:\n print(\"No\")\nelse:\n print(\"Yes\")", "s = list(input())", "s", "list(input())", "list", "input()", "input", "ew = []", "ew", "[]", "sn = []", "sn", "[]", "for i in s:\n if i == \"E\" or i == \"W\":\n ew.append(i)\n else:\n sn.append(i)", "i", "s", "if i == \"E\" or i == \"W\":\n ew.append(i)\n else:\n sn.append(i)", "i == \"E\" or i == \"W\"", "i == \"E\"", "i", "\"E\"", "i == \"W\"", "i", "\"W\"", "ew.append(i)", "ew.append", "ew", "append", "i", "sn.append(i)", "sn.append", "sn", "append", "i", "if len(set(ew)) == 1 or len(set(sn)) == 1:\n print(\"No\")\nelse:\n print(\"Yes\")", "len(set(ew)) == 1 or len(set(sn)) == 1", "len(set(ew)) == 1", "len(set(ew))", "len", "set(ew)", "set", "ew", "1", "len(set(sn)) == 1", "len(set(sn))", "len", "set(sn)", "set", "sn", "1", "print(\"No\")", "print", "\"No\"", "print(\"Yes\")", "print", "\"Yes\"", "sn = []", "[]", "sn", "s = list(input())", "list(input())", "s", "ew = []", "[]", "ew" ]
s = list(input()) ew = [] sn = [] for i in s: if i == "E" or i == "W": ew.append(i) else: sn.append(i) if len(set(ew)) == 1 or len(set(sn)) == 1: print("No") else: print("Yes")
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 14, 2, 2, 2, 40, 4, 18, 13, 13, 17, 17, 40, 4, 18, 13, 13, 17, 17, 40, 4, 18, 13, 13, 17, 17, 40, 4, 18, 13, 13, 17, 17, 4, 13, 17, 14, 2, 2, 2, 40, 4, 18, 13, 13, 17, 17, 40, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 4, 13, 17, 14, 2, 2, 2, 2, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 40, 4, 18, 13, 13, 17, 17, 40, 4, 18, 13, 13, 17, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13 ]
[ [ 122, 2 ], [ 119, 6 ], [ 123, 9 ], [ 123, 17 ], [ 123, 24 ], [ 123, 31 ], [ 123, 38 ], [ 123, 52 ], [ 123, 59 ], [ 123, 66 ], [ 123, 73 ], [ 123, 87 ], [ 123, 94 ], [ 123, 101 ], [ 123, 108 ], [ 119, 120 ], [ 122, 123 ] ]
[ "s=input()\nn=len(s)\nif s.count('N')!=0 and s.count('S')!=0 and s.count('E')!=0 and s.count('W')!=0:\n print('Yes')\nelif s.count('N')!=0 and s.count('S')!=0 and s.count('E')==0 and s.count('W')==0:\n print('Yes')\nelif s.count('N')==0 and s.count('S')==0 and s.count('E')!=0 and s.count('W')!=0:\n print('Yes')\nelse:\n print('No')", "s=input()", "s", "input()", "input", "n=len(s)", "n", "len(s)", "len", "s", "if s.count('N')!=0 and s.count('S')!=0 and s.count('E')!=0 and s.count('W')!=0:\n print('Yes')\nelif s.count('N')!=0 and s.count('S')!=0 and s.count('E')==0 and s.count('W')==0:\n print('Yes')\nelif s.count('N')==0 and s.count('S')==0 and s.count('E')!=0 and s.count('W')!=0:\n print('Yes')\nelse:\n print('No')", "s.count('N')!=0 and s.count('S')!=0 and s.count('E')!=0 and s.count('W')!=0", "s.count('N')!=0 and s.count('S')!=0 and s.count('E')!=0", "s.count('N')!=0 and s.count('S')!=0", "s.count('N')!=0", "s.count('N')", "s.count", "s", "count", "'N'", "0", "s.count('S')!=0", "s.count('S')", "s.count", "s", "count", "'S'", "0", "s.count('E')!=0", "s.count('E')", "s.count", "s", "count", "'E'", "0", "s.count('W')!=0", "s.count('W')", "s.count", "s", "count", "'W'", "0", "print('Yes')", "print", "'Yes'", "elif s.count('N')!=0 and s.count('S')!=0 and s.count('E')==0 and s.count('W')==0:\n print('Yes')", "s.count('N')!=0 and s.count('S')!=0 and s.count('E')==0 and s.count('W')==0", "s.count('N')!=0 and s.count('S')!=0 and s.count('E')==0", "s.count('N')!=0 and s.count('S')!=0", "s.count('N')!=0", "s.count('N')", "s.count", "s", "count", "'N'", "0", "s.count('S')!=0", "s.count('S')", "s.count", "s", "count", "'S'", "0", "s.count('E')==0", "s.count('E')", "s.count", "s", "count", "'E'", "0", "s.count('W')==0", "s.count('W')", "s.count", "s", "count", "'W'", "0", "print('Yes')", "print", "'Yes'", "elif s.count('N')==0 and s.count('S')==0 and s.count('E')!=0 and s.count('W')!=0:\n print('Yes')", "s.count('N')==0 and s.count('S')==0 and s.count('E')!=0 and s.count('W')!=0", "s.count('N')==0 and s.count('S')==0 and s.count('E')!=0", "s.count('N')==0 and s.count('S')==0", "s.count('N')==0", "s.count('N')", "s.count", "s", "count", "'N'", "0", "s.count('S')==0", "s.count('S')", "s.count", "s", "count", "'S'", "0", "s.count('E')!=0", "s.count('E')", "s.count", "s", "count", "'E'", "0", "s.count('W')!=0", "s.count('W')", "s.count", "s", "count", "'W'", "0", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "n=len(s)", "len(s)", "n", "s=input()", "input()", "s" ]
s=input() n=len(s) if s.count('N')!=0 and s.count('S')!=0 and s.count('E')!=0 and s.count('W')!=0: print('Yes') elif s.count('N')!=0 and s.count('S')!=0 and s.count('E')==0 and s.count('W')==0: print('Yes') elif s.count('N')==0 and s.count('S')==0 and s.count('E')!=0 and s.count('W')!=0: print('Yes') else: print('No')
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 13, 14, 2, 2, 4, 13, 13, 17, 17, 4, 13, 17, 14, 2, 4, 13, 13, 17, 14, 2, 2, 2, 17, 13, 2, 17, 13, 2, 2, 17, 13, 2, 17, 13, 4, 13, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13 ]
[ [ 58, 2 ], [ 55, 8 ], [ 59, 11 ], [ 56, 17 ], [ 59, 17 ], [ 56, 27 ], [ 59, 27 ], [ 56, 34 ], [ 59, 34 ], [ 56, 37 ], [ 59, 37 ], [ 56, 41 ], [ 59, 41 ], [ 56, 44 ], [ 59, 44 ], [ 55, 56 ], [ 58, 59 ] ]
[ "s= list(input())\ns=set(s)\nif len(s)%2==1:\n print('No')\nelse:\n if len(s) == 2:\n if \"W\" in s and \"E\" in s or \"S\" in s and \"N\" in s:\n print(\"Yes\")\n else:\n print('No')\n else:\n print('Yes')", "s= list(input())", "s", "list(input())", "list", "input()", "input", "s=set(s)", "s", "set(s)", "set", "s", "if len(s)%2==1:\n print('No')\nelse:\n if len(s) == 2:\n if \"W\" in s and \"E\" in s or \"S\" in s and \"N\" in s:\n print(\"Yes\")\n else:\n print('No')\n else:\n print('Yes')", "len(s)%2==1", "len(s)%2", "len(s)", "len", "s", "2", "1", "print('No')", "print", "'No'", "if len(s) == 2:\n if \"W\" in s and \"E\" in s or \"S\" in s and \"N\" in s:\n print(\"Yes\")\n else:\n print('No')\n else:\n print('Yes')", "len(s) == 2", "len(s)", "len", "s", "2", "if \"W\" in s and \"E\" in s or \"S\" in s and \"N\" in s:\n print(\"Yes\")\n else:\n print('No')\n ", "\"W\" in s and \"E\" in s or \"S\" in s and \"N\" in s", "\"W\" in s and \"E\" in s", "\"W\" in s", "\"W\"", "s", "\"E\" in s", "\"E\"", "s", "\"S\" in s and \"N\" in s", "\"S\" in s", "\"S\"", "s", "\"N\" in s", "\"N\"", "s", "print(\"Yes\")", "print", "\"Yes\"", "print('No')", "print", "'No'", "print('Yes')", "print", "'Yes'", "s=set(s)", "set(s)", "s", "s= list(input())", "list(input())", "s" ]
s= list(input()) s=set(s) if len(s)%2==1: print('No') else: if len(s) == 2: if "W" in s and "E" in s or "S" in s and "N" in s: print("Yes") else: print('No') else: print('Yes')
[ 7, 0, 13, 4, 18, 4, 13, 13, 0, 13, 21, 22, 17, 17, 22, 17, 17, 22, 17, 17, 22, 17, 17, 28, 13, 4, 13, 4, 13, 13, 0, 18, 13, 18, 13, 13, 17, 14, 2, 2, 2, 2, 2, 2, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 2, 2, 2, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 2, 2, 2, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 2, 2, 2, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 4, 13, 17, 4, 13, 17, 10, 21, 13, 10, 4, 13 ]
[ [ 143, 2 ], [ 140, 9 ], [ 25, 24 ], [ 144, 29 ], [ 36, 31 ], [ 141, 32 ], [ 144, 34 ], [ 24, 35 ], [ 141, 46 ], [ 141, 51 ], [ 141, 56 ], [ 141, 61 ], [ 141, 69 ], [ 141, 74 ], [ 141, 79 ], [ 141, 84 ], [ 141, 92 ], [ 141, 97 ], [ 141, 102 ], [ 141, 107 ], [ 141, 115 ], [ 141, 120 ], [ 141, 125 ], [ 141, 130 ], [ 140, 141 ], [ 143, 144 ] ]
[ "S = input().strip()\nC = {\"N\":0,\"S\":0,\"E\":0,\"W\":0}\nfor i in range(len(S)):\n C[S[i]] += 1\nif C[\"N\"]>0 and C[\"S\"]>0 and C[\"E\"]>0 and C[\"W\"]>0 or C[\"N\"]==0 and C[\"S\"]==0 and C[\"E\"]>0 and C[\"W\"]>0\\\nor C[\"N\"]>0 and C[\"S\"]>0 and C[\"E\"]==0 and C[\"W\"]==0 or C[\"N\"]==0 and C[\"S\"]==0 and C[\"E\"]==0 and C[\"W\"]==0:\n print(\"Yes\")\nelse:\n print(\"No\")", "S = input().strip()", "S", "input().strip()", "().strip", "()", "input", "strip", "C = {\"N\":0,\"S\":0,\"E\":0,\"W\":0}", "C", "{\"N\":0,\"S\":0,\"E\":0,\"W\":0}", "\"N\"", "\"N\"", "0", "\"S\"", "\"S\"", "0", "\"E\"", "\"E\"", "0", "\"W\"", "\"W\"", "0", "for i in range(len(S)):\n C[S[i]] += 1", "i", "range(len(S))", "range", "len(S)", "len", "S", "C[S[i]] += 1", "C[S[i]]", "C", "S[i]", "S", "i", "1", "if C[\"N\"]>0 and C[\"S\"]>0 and C[\"E\"]>0 and C[\"W\"]>0 or C[\"N\"]==0 and C[\"S\"]==0 and C[\"E\"]>0 and C[\"W\"]>0\\\nor C[\"N\"]>0 and C[\"S\"]>0 and C[\"E\"]==0 and C[\"W\"]==0 or C[\"N\"]==0 and C[\"S\"]==0 and C[\"E\"]==0 and C[\"W\"]==0:\n print(\"Yes\")\nelse:\n print(\"No\")", "C[\"N\"]>0 and C[\"S\"]>0 and C[\"E\"]>0 and C[\"W\"]>0 or C[\"N\"]==0 and C[\"S\"]==0 and C[\"E\"]>0 and C[\"W\"]>0\\\nor C[\"N\"]>0 and C[\"S\"]>0 and C[\"E\"]==0 and C[\"W\"]==0 or C[\"N\"]==0 and C[\"S\"]==0 and C[\"E\"]==0 and C[\"W\"]==0", "C[\"N\"]>0 and C[\"S\"]>0 and C[\"E\"]>0 and C[\"W\"]>0 or C[\"N\"]==0 and C[\"S\"]==0 and C[\"E\"]>0 and C[\"W\"]>0\\\nor C[\"N\"]>0 and C[\"S\"]>0 and C[\"E\"]==0 and C[\"W\"]==0", "C[\"N\"]>0 and C[\"S\"]>0 and C[\"E\"]>0 and C[\"W\"]>0 or C[\"N\"]==0 and C[\"S\"]==0 and C[\"E\"]>0 and C[\"W\"]>0", "C[\"N\"]>0 and C[\"S\"]>0 and C[\"E\"]>0 and C[\"W\"]>0", "C[\"N\"]>0 and C[\"S\"]>0 and C[\"E\"]>0", "C[\"N\"]>0 and C[\"S\"]>0", "C[\"N\"]>0", "C[\"N\"]", "C", "\"N\"", "0", "C[\"S\"]>0", "C[\"S\"]", "C", "\"S\"", "0", "C[\"E\"]>0", "C[\"E\"]", "C", "\"E\"", "0", "C[\"W\"]>0", "C[\"W\"]", "C", "\"W\"", "0", "C[\"N\"]==0 and C[\"S\"]==0 and C[\"E\"]>0 and C[\"W\"]>0", "C[\"N\"]==0 and C[\"S\"]==0 and C[\"E\"]>0", "C[\"N\"]==0 and C[\"S\"]==0", "C[\"N\"]==0", "C[\"N\"]", "C", "\"N\"", "0", "C[\"S\"]==0", "C[\"S\"]", "C", "\"S\"", "0", "C[\"E\"]>0", "C[\"E\"]", "C", "\"E\"", "0", "C[\"W\"]>0", "C[\"W\"]", "C", "\"W\"", "0", "C[\"N\"]>0 and C[\"S\"]>0 and C[\"E\"]==0 and C[\"W\"]==0", "C[\"N\"]>0 and C[\"S\"]>0 and C[\"E\"]==0", "C[\"N\"]>0 and C[\"S\"]>0", "C[\"N\"]>0", "C[\"N\"]", "C", "\"N\"", "0", "C[\"S\"]>0", "C[\"S\"]", "C", "\"S\"", "0", "C[\"E\"]==0", "C[\"E\"]", "C", "\"E\"", "0", "C[\"W\"]==0", "C[\"W\"]", "C", "\"W\"", "0", "C[\"N\"]==0 and C[\"S\"]==0 and C[\"E\"]==0 and C[\"W\"]==0", "C[\"N\"]==0 and C[\"S\"]==0 and C[\"E\"]==0", "C[\"N\"]==0 and C[\"S\"]==0", "C[\"N\"]==0", "C[\"N\"]", "C", "\"N\"", "0", "C[\"S\"]==0", "C[\"S\"]", "C", "\"S\"", "0", "C[\"E\"]==0", "C[\"E\"]", "C", "\"E\"", "0", "C[\"W\"]==0", "C[\"W\"]", "C", "\"W\"", "0", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "C = {\"N\":0,\"S\":0,\"E\":0,\"W\":0}", "{\"N\":0,\"S\":0,\"E\":0,\"W\":0}", "C", "S = input().strip()", "input().strip()", "S" ]
S = input().strip() C = {"N":0,"S":0,"E":0,"W":0} for i in range(len(S)): C[S[i]] += 1 if C["N"]>0 and C["S"]>0 and C["E"]>0 and C["W"]>0 or C["N"]==0 and C["S"]==0 and C["E"]>0 and C["W"]>0\ or C["N"]>0 and C["S"]>0 and C["E"]==0 and C["W"]==0 or C["N"]==0 and C["S"]==0 and C["E"]==0 and C["W"]==0: print("Yes") else: print("No")
[ 7, 15, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 17, 14, 2, 2, 2, 2, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 2, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 2, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 2, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 0, 13, 17, 14, 13, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13 ]
[ [ 76, 3 ], [ 82, 9 ], [ 77, 12 ], [ 85, 14 ], [ 83, 23 ], [ 83, 28 ], [ 83, 34 ], [ 83, 39 ], [ 83, 45 ], [ 83, 50 ], [ 83, 56 ], [ 83, 61 ], [ 79, 65 ], [ 76, 77 ], [ 79, 80 ], [ 82, 83 ], [ 85, 86 ] ]
[ "from collections import Counter\n\nS = list(input())\nc = Counter(S)\n\nans = True\n\nif (c[\"N\"]> 0 and c[\"S\"] == 0) or (c[\"N\"]== 0 and c[\"S\"] > 0) or (c[\"W\"] > 0 and c[\"E\"] == 0) or (c[\"W\"] == 0 and c[\"E\"] > 0):\n ans = False\n\nif ans:\n print(\"Yes\")\nelse:\n print(\"No\")", "from collections import Counter", "S = list(input())", "S", "list(input())", "list", "input()", "input", "c = Counter(S)", "c", "Counter(S)", "Counter", "S", "ans = True", "ans", "True", "if (c[\"N\"]> 0 and c[\"S\"] == 0) or (c[\"N\"]== 0 and c[\"S\"] > 0) or (c[\"W\"] > 0 and c[\"E\"] == 0) or (c[\"W\"] == 0 and c[\"E\"] > 0):\n ans = False", "(c[\"N\"]> 0 and c[\"S\"] == 0) or (c[\"N\"]== 0 and c[\"S\"] > 0) or (c[\"W\"] > 0 and c[\"E\"] == 0) or (c[\"W\"] == 0 and c[\"E\"] > 0)", "(c[\"N\"]> 0 and c[\"S\"] == 0) or (c[\"N\"]== 0 and c[\"S\"] > 0) or (c[\"W\"] > 0 and c[\"E\"] == 0)", "(c[\"N\"]> 0 and c[\"S\"] == 0) or (c[\"N\"]== 0 and c[\"S\"] > 0)", "c[\"N\"]> 0 and c[\"S\"] == 0", "c[\"N\"]> 0", "c[\"N\"]", "c", "\"N\"", "0", "c[\"S\"] == 0", "c[\"S\"]", "c", "\"S\"", "0", "c[\"N\"]== 0 and c[\"S\"] > 0", "c[\"N\"]== 0", "c[\"N\"]", "c", "\"N\"", "0", "c[\"S\"] > 0", "c[\"S\"]", "c", "\"S\"", "0", "c[\"W\"] > 0 and c[\"E\"] == 0", "c[\"W\"] > 0", "c[\"W\"]", "c", "\"W\"", "0", "c[\"E\"] == 0", "c[\"E\"]", "c", "\"E\"", "0", "c[\"W\"] == 0 and c[\"E\"] > 0", "c[\"W\"] == 0", "c[\"W\"]", "c", "\"W\"", "0", "c[\"E\"] > 0", "c[\"E\"]", "c", "\"E\"", "0", "ans = False", "ans", "False", "if ans:\n print(\"Yes\")\nelse:\n print(\"No\")", "ans", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "S = list(input())", "list(input())", "S", "ans = False", "False", "ans", "c = Counter(S)", "Counter(S)", "c", "ans = True", "True", "ans" ]
from collections import Counter S = list(input()) c = Counter(S) ans = True if (c["N"]> 0 and c["S"] == 0) or (c["N"]== 0 and c["S"] > 0) or (c["W"] > 0 and c["E"] == 0) or (c["W"] == 0 and c["E"] > 0): ans = False if ans: print("Yes") else: print("No")
[ 7, 15, 0, 13, 4, 13, 14, 2, 17, 13, 14, 40, 17, 13, 4, 13, 4, 13, 17, 14, 2, 17, 13, 14, 40, 17, 13, 4, 13, 4, 13, 17, 14, 2, 17, 13, 14, 40, 17, 13, 4, 13, 4, 13, 17, 14, 2, 17, 13, 14, 40, 17, 13, 4, 13, 4, 13, 17, 4, 13, 17, 10, 4, 13 ]
[ [ 62, 3 ], [ 63, 9 ], [ 63, 13 ], [ 63, 22 ], [ 63, 26 ], [ 63, 35 ], [ 63, 39 ], [ 63, 48 ], [ 63, 52 ], [ 62, 63 ] ]
[ "from sys import exit\ns = input()\nif \"N\" in s:\n if \"S\" not in s:\n exit(print(\"No\"))\nif \"S\" in s:\n if \"N\" not in s:\n exit(print(\"No\"))\nif \"W\" in s:\n if \"E\" not in s:\n exit(print(\"No\"))\nif \"E\" in s:\n if \"W\" not in s:\n exit(print(\"No\"))\nprint(\"Yes\")", "from sys import exit", "s = input()", "s", "input()", "input", "if \"N\" in s:\n if \"S\" not in s:\n exit(print(\"No\"))", "\"N\" in s", "\"N\"", "s", "if \"S\" not in s:\n exit(print(\"No\"))", "\"S\" not in s", "\"S\"", "s", "exit(print(\"No\"))", "exit", "print(\"No\")", "print", "\"No\"", "if \"S\" in s:\n if \"N\" not in s:\n exit(print(\"No\"))", "\"S\" in s", "\"S\"", "s", "if \"N\" not in s:\n exit(print(\"No\"))", "\"N\" not in s", "\"N\"", "s", "exit(print(\"No\"))", "exit", "print(\"No\")", "print", "\"No\"", "if \"W\" in s:\n if \"E\" not in s:\n exit(print(\"No\"))", "\"W\" in s", "\"W\"", "s", "if \"E\" not in s:\n exit(print(\"No\"))", "\"E\" not in s", "\"E\"", "s", "exit(print(\"No\"))", "exit", "print(\"No\")", "print", "\"No\"", "if \"E\" in s:\n if \"W\" not in s:\n exit(print(\"No\"))", "\"E\" in s", "\"E\"", "s", "if \"W\" not in s:\n exit(print(\"No\"))", "\"W\" not in s", "\"W\"", "s", "exit(print(\"No\"))", "exit", "print(\"No\")", "print", "\"No\"", "print(\"Yes\")", "print", "\"Yes\"", "s = input()", "input()", "s" ]
from sys import exit s = input() if "N" in s: if "S" not in s: exit(print("No")) if "S" in s: if "N" not in s: exit(print("No")) if "W" in s: if "E" not in s: exit(print("No")) if "E" in s: if "W" not in s: exit(print("No")) print("Yes")
[ 7, 15, 13, 0, 13, 4, 13, 0, 13, 4, 18, 13, 13, 13, 0, 13, 4, 18, 13, 13, 14, 2, 4, 13, 13, 17, 4, 13, 17, 14, 2, 4, 13, 13, 17, 14, 2, 2, 17, 13, 2, 17, 13, 4, 13, 17, 14, 2, 2, 17, 13, 2, 17, 13, 4, 13, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 64, 4 ], [ 70, 8 ], [ 65, 13 ], [ 67, 15 ], [ 71, 18 ], [ 68, 24 ], [ 68, 33 ], [ 68, 39 ], [ 68, 42 ], [ 68, 50 ], [ 68, 53 ], [ 64, 65 ], [ 67, 68 ], [ 70, 71 ] ]
[ "import collections\n\nS = input()\n\nc = collections.Counter(S)\nK = c.keys()\n\nif len(K) == 4:\n print('Yes')\nelif len(K) == 2:\n if 'N' in K and 'S' in K:\n print('Yes')\n elif 'W' in K and 'E' in K:\n print('Yes')\n else:\n print('No')\nelse:\n print('No')", "import collections", "collections", "S = input()", "S", "input()", "input", "c = collections.Counter(S)", "c", "collections.Counter(S)", "collections.Counter", "collections", "Counter", "S", "K = c.keys()", "K", "c.keys()", "c.keys", "c", "keys", "if len(K) == 4:\n print('Yes')\nelif len(K) == 2:\n if 'N' in K and 'S' in K:\n print('Yes')\n elif 'W' in K and 'E' in K:\n print('Yes')\n else:\n print('No')\nelse:\n print('No')", "len(K) == 4", "len(K)", "len", "K", "4", "print('Yes')", "print", "'Yes'", "elif len(K) == 2:\n if 'N' in K and 'S' in K:\n print('Yes')\n elif 'W' in K and 'E' in K:\n print('Yes')\n else:\n print('No')", "len(K) == 2", "len(K)", "len", "K", "2", "if 'N' in K and 'S' in K:\n print('Yes')\n elif 'W' in K and 'E' in K:\n print('Yes')\n else:\n print('No')", "'N' in K and 'S' in K", "'N' in K", "'N'", "K", "'S' in K", "'S'", "K", "print('Yes')", "print", "'Yes'", "elif 'W' in K and 'E' in K:\n print('Yes')\n ", "'W' in K and 'E' in K", "'W' in K", "'W'", "K", "'E' in K", "'E'", "K", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "print('No')", "print", "'No'", "S = input()", "input()", "S", "K = c.keys()", "c.keys()", "K", "c = collections.Counter(S)", "collections.Counter(S)", "c" ]
import collections S = input() c = collections.Counter(S) K = c.keys() if len(K) == 4: print('Yes') elif len(K) == 2: if 'N' in K and 'S' in K: print('Yes') elif 'W' in K and 'E' in K: print('Yes') else: print('No') else: print('No')
[ 7, 0, 13, 4, 13, 4, 13, 4, 13, 14, 2, 4, 13, 13, 17, 0, 13, 17, 14, 2, 2, 4, 13, 13, 17, 2, 4, 13, 13, 17, 0, 13, 17, 14, 2, 2, 2, 17, 13, 2, 17, 13, 2, 2, 17, 13, 2, 17, 13, 0, 13, 17, 0, 13, 17, 4, 13, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 62, 2 ], [ 63, 13 ], [ 71, 16 ], [ 63, 23 ], [ 63, 28 ], [ 65, 31 ], [ 63, 38 ], [ 63, 41 ], [ 63, 45 ], [ 63, 48 ], [ 68, 50 ], [ 59, 53 ], [ 60, 57 ], [ 69, 57 ], [ 66, 57 ], [ 72, 57 ], [ 59, 60 ], [ 62, 63 ], [ 65, 66 ], [ 68, 69 ], [ 71, 72 ] ]
[ "S = set(list(input()))\n\nif len(S) == 4:\n ans = \"Yes\"\nelif len(S) == 3 or len(S) == 1:\n ans = \"No\"\nelse:\n # print(list(S))\n if (\"N\" in S and \"S\" in S) or (\"E\" in S and \"W\" in S):\n ans = \"Yes\"\n else:\n ans = \"No\"\n\nprint(ans)", "S = set(list(input()))", "S", "set(list(input()))", "set", "list(input())", "list", "input()", "input", "if len(S) == 4:\n ans = \"Yes\"\nelif len(S) == 3 or len(S) == 1:\n ans = \"No\"\nelse:\n # print(list(S))\n if (\"N\" in S and \"S\" in S) or (\"E\" in S and \"W\" in S):\n ans = \"Yes\"\n else:\n ans = \"No\"", "len(S) == 4", "len(S)", "len", "S", "4", "ans = \"Yes\"", "ans", "\"Yes\"", "elif len(S) == 3 or len(S) == 1:\n ans = \"No\"", "len(S) == 3 or len(S) == 1", "len(S) == 3", "len(S)", "len", "S", "3", "len(S) == 1", "len(S)", "len", "S", "1", "ans = \"No\"", "ans", "\"No\"", "if (\"N\" in S and \"S\" in S) or (\"E\" in S and \"W\" in S):\n ans = \"Yes\"\n else:\n ans = \"No\"", "(\"N\" in S and \"S\" in S) or (\"E\" in S and \"W\" in S)", "\"N\" in S and \"S\" in S", "\"N\" in S", "\"N\"", "S", "\"S\" in S", "\"S\"", "S", "\"E\" in S and \"W\" in S", "\"E\" in S", "\"E\"", "S", "\"W\" in S", "\"W\"", "S", "ans = \"Yes\"", "ans", "\"Yes\"", "ans = \"No\"", "ans", "\"No\"", "print(ans)", "print", "ans", "ans = \"No\"", "\"No\"", "ans", "S = set(list(input()))", "set(list(input()))", "S", "ans = \"No\"", "\"No\"", "ans", "ans = \"Yes\"", "\"Yes\"", "ans", "ans = \"Yes\"", "\"Yes\"", "ans" ]
S = set(list(input())) if len(S) == 4: ans = "Yes" elif len(S) == 3 or len(S) == 1: ans = "No" else: # print(list(S)) if ("N" in S and "S" in S) or ("E" in S and "W" in S): ans = "Yes" else: ans = "No" print(ans)
[ 7, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 0, 13, 17, 0, 13, 17, 28, 13, 4, 13, 4, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 0, 13, 17, 14, 2, 18, 13, 13, 17, 0, 13, 17, 14, 2, 18, 13, 13, 17, 0, 13, 17, 14, 2, 18, 13, 13, 17, 0, 13, 17, 14, 2, 2, 2, 2, 13, 13, 17, 17, 2, 2, 2, 13, 13, 17, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 85, 2 ], [ 109, 6 ], [ 100, 9 ], [ 106, 12 ], [ 94, 15 ], [ 19, 18 ], [ 86, 25 ], [ 86, 29 ], [ 18, 30 ], [ 88, 33 ], [ 86, 38 ], [ 18, 39 ], [ 103, 42 ], [ 86, 47 ], [ 18, 48 ], [ 91, 51 ], [ 86, 56 ], [ 18, 57 ], [ 97, 60 ], [ 98, 67 ], [ 107, 67 ], [ 92, 68 ], [ 95, 68 ], [ 89, 74 ], [ 110, 74 ], [ 104, 75 ], [ 101, 75 ], [ 85, 86 ], [ 88, 89 ], [ 91, 92 ], [ 94, 95 ], [ 97, 98 ], [ 100, 101 ], [ 103, 104 ], [ 106, 107 ], [ 109, 110 ] ]
[ "t=input()\nn=0\ns=0\nw=0\ne=0\nfor i in range(int(len(t))):\n if t[i] ==\"N\":\n n=1\n if t[i] ==\"S\":\n s=1\n if t[i] ==\"E\":\n e=1\n if t[i] ==\"W\":\n w=1\nif (w+e)%2==0 and (n+s)%2==0:\n print(\"Yes\")\nelse:\n print(\"No\") ", "t=input()", "t", "input()", "input", "n=0", "n", "0", "s=0", "s", "0", "w=0", "w", "0", "e=0", "e", "0", "for i in range(int(len(t))):\n if t[i] ==\"N\":\n n=1\n if t[i] ==\"S\":\n s=1\n if t[i] ==\"E\":\n e=1\n if t[i] ==\"W\":\n w=1", "i", "range(int(len(t)))", "range", "int(len(t))", "int", "len(t)", "len", "t", "if t[i] ==\"N\":\n n=1\n ", "t[i] ==\"N\"", "t[i]", "t", "i", "\"N\"", "n=1", "n", "1", "if t[i] ==\"S\":\n s=1\n ", "t[i] ==\"S\"", "t[i]", "t", "i", "\"S\"", "s=1", "s", "1", "if t[i] ==\"E\":\n e=1\n ", "t[i] ==\"E\"", "t[i]", "t", "i", "\"E\"", "e=1", "e", "1", "if t[i] ==\"W\":\n w=1", "t[i] ==\"W\"", "t[i]", "t", "i", "\"W\"", "w=1", "w", "1", "if (w+e)%2==0 and (n+s)%2==0:\n print(\"Yes\")\nelse:\n print(\"No\") ", "(w+e)%2==0 and (n+s)%2==0", "(w+e)%2==0", "(w+e)%2", "w+e", "w", "e", "2", "0", "(n+s)%2==0", "(n+s)%2", "n+s", "n", "s", "2", "0", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "t=input()", "input()", "t", "n=1", "1", "n", "e=1", "1", "e", "e=0", "0", "e", "w=1", "1", "w", "s=0", "0", "s", "s=1", "1", "s", "w=0", "0", "w", "n=0", "0", "n" ]
t=input() n=0 s=0 w=0 e=0 for i in range(int(len(t))): if t[i] =="N": n=1 if t[i] =="S": s=1 if t[i] =="E": e=1 if t[i] =="W": w=1 if (w+e)%2==0 and (n+s)%2==0: print("Yes") else: print("No")
[ 7, 0, 13, 4, 13, 0, 13, 2, 17, 13, 0, 13, 2, 17, 13, 0, 13, 2, 17, 13, 0, 13, 2, 17, 13, 14, 2, 2, 13, 13, 2, 13, 13, 4, 13, 17, 4, 13, 17, 10, 2, 13, 10, 2, 13, 10, 2, 13, 10, 4, 13, 10, 2, 13 ]
[ [ 49, 2 ], [ 46, 6 ], [ 50, 9 ], [ 52, 11 ], [ 50, 14 ], [ 43, 16 ], [ 50, 19 ], [ 40, 21 ], [ 50, 24 ], [ 47, 28 ], [ 44, 29 ], [ 53, 31 ], [ 41, 32 ], [ 40, 41 ], [ 43, 44 ], [ 46, 47 ], [ 49, 50 ], [ 52, 53 ] ]
[ "t=input()\nn='N' in t\nw='W' in t\ns='S' in t\ne='E' in t\n\nif n==s and w==e:\n print('Yes')\nelse:\n print('No')", "t=input()", "t", "input()", "input", "n='N' in t", "n", "'N' in t", "'N'", "t", "w='W' in t", "w", "'W' in t", "'W'", "t", "s='S' in t", "s", "'S' in t", "'S'", "t", "e='E' in t", "e", "'E' in t", "'E'", "t", "if n==s and w==e:\n print('Yes')\nelse:\n print('No')", "n==s and w==e", "n==s", "n", "s", "w==e", "w", "e", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "e='E' in t", "'E' in t", "e", "s='S' in t", "'S' in t", "s", "n='N' in t", "'N' in t", "n", "t=input()", "input()", "t", "w='W' in t", "'W' in t", "w" ]
t=input() n='N' in t w='W' in t s='S' in t e='E' in t if n==s and w==e: print('Yes') else: print('No')
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 13, 14, 2, 2, 17, 13, 40, 17, 13, 4, 13, 17, 14, 2, 2, 17, 13, 40, 17, 13, 4, 13, 17, 14, 2, 2, 17, 13, 40, 17, 13, 4, 13, 17, 14, 2, 2, 17, 13, 40, 17, 13, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13 ]
[ [ 63, 2 ], [ 60, 8 ], [ 64, 11 ], [ 61, 16 ], [ 64, 16 ], [ 61, 19 ], [ 64, 19 ], [ 61, 27 ], [ 64, 27 ], [ 61, 30 ], [ 64, 30 ], [ 61, 38 ], [ 64, 38 ], [ 61, 41 ], [ 64, 41 ], [ 61, 49 ], [ 64, 49 ], [ 61, 52 ], [ 64, 52 ], [ 60, 61 ], [ 63, 64 ] ]
[ "s=str(input())\ns=list(s)\nif \"W\" in s and \"E\" not in s:\n print(\"No\")\nelif \"E\" in s and \"W\" not in s:\n print(\"No\")\nelif \"N\" in s and \"S\" not in s:\n print(\"No\")\nelif \"S\" in s and \"N\" not in s:\n print(\"No\")\nelse:\n print(\"Yes\")", "s=str(input())", "s", "str(input())", "str", "input()", "input", "s=list(s)", "s", "list(s)", "list", "s", "if \"W\" in s and \"E\" not in s:\n print(\"No\")\nelif \"E\" in s and \"W\" not in s:\n print(\"No\")\nelif \"N\" in s and \"S\" not in s:\n print(\"No\")\nelif \"S\" in s and \"N\" not in s:\n print(\"No\")\nelse:\n print(\"Yes\")", "\"W\" in s and \"E\" not in s", "\"W\" in s", "\"W\"", "s", "\"E\" not in s", "\"E\"", "s", "print(\"No\")", "print", "\"No\"", "elif \"E\" in s and \"W\" not in s:\n print(\"No\")", "\"E\" in s and \"W\" not in s", "\"E\" in s", "\"E\"", "s", "\"W\" not in s", "\"W\"", "s", "print(\"No\")", "print", "\"No\"", "elif \"N\" in s and \"S\" not in s:\n print(\"No\")", "\"N\" in s and \"S\" not in s", "\"N\" in s", "\"N\"", "s", "\"S\" not in s", "\"S\"", "s", "print(\"No\")", "print", "\"No\"", "elif \"S\" in s and \"N\" not in s:\n print(\"No\")", "\"S\" in s and \"N\" not in s", "\"S\" in s", "\"S\"", "s", "\"N\" not in s", "\"N\"", "s", "print(\"No\")", "print", "\"No\"", "print(\"Yes\")", "print", "\"Yes\"", "s=list(s)", "list(s)", "s", "s=str(input())", "str(input())", "s" ]
s=str(input()) s=list(s) if "W" in s and "E" not in s: print("No") elif "E" in s and "W" not in s: print("No") elif "N" in s and "S" not in s: print("No") elif "S" in s and "N" not in s: print("No") else: print("Yes")
[ 7, 0, 13, 4, 13, 14, 2, 2, 40, 17, 13, 2, 17, 13, 2, 2, 17, 13, 40, 17, 13, 4, 13, 17, 14, 2, 2, 40, 17, 13, 2, 17, 13, 2, 2, 17, 13, 40, 17, 13, 4, 13, 17, 4, 13, 17, 10, 4, 13 ]
[ [ 47, 2 ], [ 48, 10 ], [ 48, 13 ], [ 48, 17 ], [ 48, 20 ], [ 48, 29 ], [ 48, 32 ], [ 48, 36 ], [ 48, 39 ], [ 47, 48 ] ]
[ "S=input()\nif ((\"S\" not in S) and (\"N\" in S)) or ((\"S\" in S) and (\"N\" not in S)):\n print(\"No\")\nelif ((\"W\" not in S) and (\"E\" in S)) or ((\"W\" in S) and (\"E\" not in S)):\n print(\"No\")\nelse:\n print(\"Yes\")", "S=input()", "S", "input()", "input", "if ((\"S\" not in S) and (\"N\" in S)) or ((\"S\" in S) and (\"N\" not in S)):\n print(\"No\")\nelif ((\"W\" not in S) and (\"E\" in S)) or ((\"W\" in S) and (\"E\" not in S)):\n print(\"No\")\nelse:\n print(\"Yes\")", "((\"S\" not in S) and (\"N\" in S)) or ((\"S\" in S) and (\"N\" not in S))", "(\"S\" not in S) and (\"N\" in S)", "\"S\" not in S", "\"S\"", "S", "\"N\" in S", "\"N\"", "S", "(\"S\" in S) and (\"N\" not in S)", "\"S\" in S", "\"S\"", "S", "\"N\" not in S", "\"N\"", "S", "print(\"No\")", "print", "\"No\"", "elif ((\"W\" not in S) and (\"E\" in S)) or ((\"W\" in S) and (\"E\" not in S)):\n print(\"No\")", "((\"W\" not in S) and (\"E\" in S)) or ((\"W\" in S) and (\"E\" not in S))", "(\"W\" not in S) and (\"E\" in S)", "\"W\" not in S", "\"W\"", "S", "\"E\" in S", "\"E\"", "S", "(\"W\" in S) and (\"E\" not in S)", "\"W\" in S", "\"W\"", "S", "\"E\" not in S", "\"E\"", "S", "print(\"No\")", "print", "\"No\"", "print(\"Yes\")", "print", "\"Yes\"", "S=input()", "input()", "S" ]
S=input() if (("S" not in S) and ("N" in S)) or (("S" in S) and ("N" not in S)): print("No") elif (("W" not in S) and ("E" in S)) or (("W" in S) and ("E" not in S)): print("No") else: print("Yes")
[ 7, 0, 13, 4, 13, 14, 2, 2, 2, 17, 13, 2, 17, 13, 2, 40, 17, 13, 40, 17, 13, 14, 2, 2, 2, 17, 13, 2, 17, 13, 2, 40, 17, 13, 40, 17, 13, 4, 13, 17, 4, 13, 4, 13, 17, 10, 4, 13 ]
[ [ 46, 2 ], [ 47, 10 ], [ 47, 13 ], [ 47, 17 ], [ 47, 20 ], [ 47, 26 ], [ 47, 29 ], [ 47, 33 ], [ 47, 36 ], [ 46, 47 ] ]
[ "s = input()\nif (\"N\" in s and \"S\" in s) or (\"N\" not in s and \"S\" not in s):\n if (\"W\" in s and \"E\" in s) or (\"W\" not in s and \"E\" not in s):\n print(\"Yes\")\n exit()\nprint(\"No\")", "s = input()", "s", "input()", "input", "if (\"N\" in s and \"S\" in s) or (\"N\" not in s and \"S\" not in s):\n if (\"W\" in s and \"E\" in s) or (\"W\" not in s and \"E\" not in s):\n print(\"Yes\")\n exit()", "(\"N\" in s and \"S\" in s) or (\"N\" not in s and \"S\" not in s)", "\"N\" in s and \"S\" in s", "\"N\" in s", "\"N\"", "s", "\"S\" in s", "\"S\"", "s", "\"N\" not in s and \"S\" not in s", "\"N\" not in s", "\"N\"", "s", "\"S\" not in s", "\"S\"", "s", "if (\"W\" in s and \"E\" in s) or (\"W\" not in s and \"E\" not in s):\n print(\"Yes\")\n exit()", "(\"W\" in s and \"E\" in s) or (\"W\" not in s and \"E\" not in s)", "\"W\" in s and \"E\" in s", "\"W\" in s", "\"W\"", "s", "\"E\" in s", "\"E\"", "s", "\"W\" not in s and \"E\" not in s", "\"W\" not in s", "\"W\"", "s", "\"E\" not in s", "\"E\"", "s", "print(\"Yes\")", "print", "\"Yes\"", "exit()", "exit", "print(\"No\")", "print", "\"No\"", "s = input()", "input()", "s" ]
s = input() if ("N" in s and "S" in s) or ("N" not in s and "S" not in s): if ("W" in s and "E" in s) or ("W" not in s and "E" not in s): print("Yes") exit() print("No")
[ 7, 0, 13, 4, 13, 14, 2, 2, 2, 2, 17, 13, 2, 17, 13, 2, 40, 17, 13, 40, 17, 13, 2, 2, 2, 17, 13, 2, 17, 13, 2, 40, 17, 13, 40, 17, 13, 4, 13, 17, 4, 13, 17, 10, 4, 13 ]
[ [ 44, 2 ], [ 45, 11 ], [ 45, 14 ], [ 45, 18 ], [ 45, 21 ], [ 45, 26 ], [ 45, 29 ], [ 45, 33 ], [ 45, 36 ], [ 44, 45 ] ]
[ "S = input()\n\nif (((\"N\" in S and \"S\" in S) \nor(\"N\" not in S and \"S\" not in S))\nand((\"E\" in S and \"W\" in S)\nor (\"E\" not in S and \"W\" not in S))):\n print('Yes')\nelse:\n print('No')", "S = input()", "S", "input()", "input", "if (((\"N\" in S and \"S\" in S) \nor(\"N\" not in S and \"S\" not in S))\nand((\"E\" in S and \"W\" in S)\nor (\"E\" not in S and \"W\" not in S))):\n print('Yes')\nelse:\n print('No')", "((\"N\" in S and \"S\" in S) \nor(\"N\" not in S and \"S\" not in S))\nand((\"E\" in S and \"W\" in S)\nor (\"E\" not in S and \"W\" not in S))", "(\"N\" in S and \"S\" in S) \nor(\"N\" not in S and \"S\" not in S)", "\"N\" in S and \"S\" in S", "\"N\" in S", "\"N\"", "S", "\"S\" in S", "\"S\"", "S", "\"N\" not in S and \"S\" not in S", "\"N\" not in S", "\"N\"", "S", "\"S\" not in S", "\"S\"", "S", "(\"E\" in S and \"W\" in S)\nor (\"E\" not in S and \"W\" not in S)", "\"E\" in S and \"W\" in S", "\"E\" in S", "\"E\"", "S", "\"W\" in S", "\"W\"", "S", "\"E\" not in S and \"W\" not in S", "\"E\" not in S", "\"E\"", "S", "\"W\" not in S", "\"W\"", "S", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "S = input()", "input()", "S" ]
S = input() if ((("N" in S and "S" in S) or("N" not in S and "S" not in S)) and(("E" in S and "W" in S) or ("E" not in S and "W" not in S))): print('Yes') else: print('No')
[ 7, 15, 13, 12, 13, 12, 13, 41, 28, 13, 4, 18, 4, 13, 13, 4, 13, 12, 13, 41, 28, 13, 4, 18, 4, 13, 13, 4, 4, 13, 13, 12, 13, 15, 0, 13, 4, 13, 4, 13, 0, 13, 17, 14, 2, 2, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 2, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 14, 2, 2, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 2, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 0, 13, 17, 4, 13, 8, 13, 17, 17, 10, 12, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 12, 13, 10, 12, 13, 10, 12, 13 ]
[ [ 10, 9 ], [ 114, 13 ], [ 9, 16 ], [ 22, 21 ], [ 114, 25 ], [ 21, 30 ], [ 107, 35 ], [ 114, 39 ], [ 110, 41 ], [ 108, 48 ], [ 108, 53 ], [ 108, 59 ], [ 108, 64 ], [ 108, 72 ], [ 108, 77 ], [ 108, 83 ], [ 108, 88 ], [ 104, 92 ], [ 105, 97 ], [ 111, 97 ], [ 104, 105 ], [ 107, 108 ], [ 110, 111 ] ]
[ "import sys\ndef rs(): return sys.stdin.readline().rstrip()\ndef ri(): return int(rs())\ndef rs_(): return [_ for _ in rs().split()]\ndef ri_(): return [int(_) for _ in rs().split()]\n\nfrom collections import Counter\nc = Counter(rs())\nf = False\nif (c['N'] > 0 and c['S'] > 0) or (c['N'] == 0 and c['S'] == 0):\n if (c['W'] > 0 and c['E'] > 0) or (c['W'] == 0 and c['E'] == 0):\n f = True\nprint('Yes' if f else 'No')", "import sys", "sys", "def rs(): return sys.stdin.readline().rstrip()", "rs", "def ri(): return int(rs())", "ri", "_ for _ in rs().split()", "for _ in rs().split()", "_", "rs().split()", "().split", "()", "rs", "split", "for _ in rs().split()", "_", "def rs_(): return [_ for _ in rs().split()]", "rs_", "int(_) for _ in rs().split()", "for _ in rs().split()", "_", "rs().split()", "().split", "()", "rs", "split", "for _ in rs().split()", "int(_)", "int", "_", "def ri_(): return [int(_) for _ in rs().split()]", "ri_", "from collections import Counter", "c = Counter(rs())", "c", "Counter(rs())", "Counter", "rs()", "rs", "f = False", "f", "False", "if (c['N'] > 0 and c['S'] > 0) or (c['N'] == 0 and c['S'] == 0):\n if (c['W'] > 0 and c['E'] > 0) or (c['W'] == 0 and c['E'] == 0):\n f = True", "(c['N'] > 0 and c['S'] > 0) or (c['N'] == 0 and c['S'] == 0)", "c['N'] > 0 and c['S'] > 0", "c['N'] > 0", "c['N']", "c", "'N'", "0", "c['S'] > 0", "c['S']", "c", "'S'", "0", "c['N'] == 0 and c['S'] == 0", "c['N'] == 0", "c['N']", "c", "'N'", "0", "c['S'] == 0", "c['S']", "c", "'S'", "0", "if (c['W'] > 0 and c['E'] > 0) or (c['W'] == 0 and c['E'] == 0):\n f = True", "(c['W'] > 0 and c['E'] > 0) or (c['W'] == 0 and c['E'] == 0)", "c['W'] > 0 and c['E'] > 0", "c['W'] > 0", "c['W']", "c", "'W'", "0", "c['E'] > 0", "c['E']", "c", "'E'", "0", "c['W'] == 0 and c['E'] == 0", "c['W'] == 0", "c['W']", "c", "'W'", "0", "c['E'] == 0", "c['E']", "c", "'E'", "0", "f = True", "f", "True", "print('Yes' if f else 'No')", "print", "'Yes' if f else 'No'", "f", "'Yes'", "'No'", "def rs_(): return [_ for _ in rs().split()]", "def rs_(): return [_ for _ in rs().split()]", "rs_", "f = True", "True", "f", "c = Counter(rs())", "Counter(rs())", "c", "f = False", "False", "f", "def rs(): return sys.stdin.readline().rstrip()", "def rs(): return sys.stdin.readline().rstrip()", "rs", "def ri(): return int(rs())", "def ri(): return int(rs())", "ri", "def ri_(): return [int(_) for _ in rs().split()]", "def ri_(): return [int(_) for _ in rs().split()]", "ri_" ]
import sys def rs(): return sys.stdin.readline().rstrip() def ri(): return int(rs()) def rs_(): return [_ for _ in rs().split()] def ri_(): return [int(_) for _ in rs().split()] from collections import Counter c = Counter(rs()) f = False if (c['N'] > 0 and c['S'] > 0) or (c['N'] == 0 and c['S'] == 0): if (c['W'] > 0 and c['E'] > 0) or (c['W'] == 0 and c['E'] == 0): f = True print('Yes' if f else 'No')
[ 7, 15, 13, 15, 15, 12, 13, 41, 28, 13, 4, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 4, 13, 13, 14, 2, 2, 13, 17, 2, 2, 13, 17, 2, 2, 2, 17, 13, 2, 17, 13, 2, 2, 17, 13, 2, 17, 13, 4, 13, 17, 4, 13, 17, 0, 13, 17, 28, 13, 4, 13, 17, 2, 13, 17, 0, 13, 4, 13, 17, 10, 12, 13, 10, 4, 13, 10, 17, 13 ]
[ [ 10, 9 ], [ 9, 13 ], [ 16, 15 ], [ 21, 20 ], [ 15, 23 ], [ 20, 27 ], [ 20, 31 ], [ 15, 37 ], [ 15, 40 ], [ 15, 44 ], [ 15, 47 ], [ 77, 55 ], [ 59, 58 ], [ 78, 63 ], [ 74, 66 ], [ 72, 68 ], [ 74, 75 ], [ 77, 78 ] ]
[ "# -*- coding: utf-8 -*-\nimport sys\nfrom collections import deque, defaultdict\nfrom math import sqrt, factorial\n# def input(): return sys.stdin.readline()[:-1] # warning not \\n\n# def input(): return sys.stdin.buffer.readline().strip() # warning bytes\n# def input(): return sys.stdin.buffer.readline().decode('utf-8')\n\n\ndef solve():\n s = set([x for x in input()])\n n = len(s)\n if n == 4 or (n == 2 and ('S' in s and 'N' in s or 'W' in s and 'E' in s)):\n print(\"Yes\")\n else:\n print(\"No\")\n\n\n\nt = 1\n# t = int(input())\nfor case in range(1,t+1):\n ans = solve()\n\n\n\n\n\"\"\"\n\n4\n1 2\n2 4\n1 3\n3\n2 2 4\n4 5 6\n\n6\n1 2\n2 3\n3 4\n4 5\n4 6\n3\n3 5 6\n2 17 31 5 11\n\n\"\"\"\n\n\n", "import sys", "sys", "from collections import deque, defaultdict", "from math import sqrt, factorial", "def solve():\n s = set([x for x in input()])\n n = len(s)\n if n == 4 or (n == 2 and ('S' in s and 'N' in s or 'W' in s and 'E' in s)):\n print(\"Yes\")\n else:\n print(\"No\")", "solve", "x for x in input()", "for x in input()", "x", "input()", "input", "for x in input()", "x", "s = set([x for x in input()])", "s", "set([x for x in input()])", "set", "[x for x in input()]", "n = len(s)", "n", "len(s)", "len", "s", "if n == 4 or (n == 2 and ('S' in s and 'N' in s or 'W' in s and 'E' in s)):\n print(\"Yes\")\n else:\n print(\"No\")", "n == 4 or (n == 2 and ('S' in s and 'N' in s or 'W' in s and 'E' in s))", "n == 4", "n", "4", "n == 2 and ('S' in s and 'N' in s or 'W' in s and 'E' in s)", "n == 2", "n", "2", "'S' in s and 'N' in s or 'W' in s and 'E' in s", "'S' in s and 'N' in s", "'S' in s", "'S'", "s", "'N' in s", "'N'", "s", "'W' in s and 'E' in s", "'W' in s", "'W'", "s", "'E' in s", "'E'", "s", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "t = 1", "t", "1", "for case in range(1,t+1):\n ans = solve()", "case", "range(1,t+1)", "range", "1", "t+1", "t", "1", "ans = solve()", "ans", "solve()", "solve", "\"\"\"\n\n4\n1 2\n2 4\n1 3\n3\n2 2 4\n4 5 6\n\n6\n1 2\n2 3\n3 4\n4 5\n4 6\n3\n3 5 6\n2 17 31 5 11\n\n\"\"\"", "def solve():\n s = set([x for x in input()])\n n = len(s)\n if n == 4 or (n == 2 and ('S' in s and 'N' in s or 'W' in s and 'E' in s)):\n print(\"Yes\")\n else:\n print(\"No\")", "def solve():\n s = set([x for x in input()])\n n = len(s)\n if n == 4 or (n == 2 and ('S' in s and 'N' in s or 'W' in s and 'E' in s)):\n print(\"Yes\")\n else:\n print(\"No\")", "solve", "ans = solve()", "solve()", "ans", "t = 1", "1", "t" ]
# -*- coding: utf-8 -*- import sys from collections import deque, defaultdict from math import sqrt, factorial # def input(): return sys.stdin.readline()[:-1] # warning not \n # def input(): return sys.stdin.buffer.readline().strip() # warning bytes # def input(): return sys.stdin.buffer.readline().decode('utf-8') def solve(): s = set([x for x in input()]) n = len(s) if n == 4 or (n == 2 and ('S' in s and 'N' in s or 'W' in s and 'E' in s)): print("Yes") else: print("No") t = 1 # t = int(input()) for case in range(1,t+1): ans = solve() """ 4 1 2 2 4 1 3 3 2 2 4 4 5 6 6 1 2 2 3 3 4 4 5 4 6 3 3 5 6 2 17 31 5 11 """
[ 7, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 0, 13, 17, 14, 2, 2, 4, 18, 13, 13, 17, 17, 40, 4, 18, 13, 13, 17, 17, 0, 13, 17, 14, 2, 40, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 0, 13, 17, 14, 2, 2, 4, 18, 13, 13, 17, 17, 40, 4, 18, 13, 13, 17, 17, 0, 13, 17, 14, 2, 40, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 0, 13, 17, 4, 13, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 100, 2 ], [ 109, 6 ], [ 115, 9 ], [ 106, 12 ], [ 101, 19 ], [ 101, 26 ], [ 112, 31 ], [ 101, 38 ], [ 101, 45 ], [ 97, 50 ], [ 101, 57 ], [ 101, 64 ], [ 103, 69 ], [ 101, 76 ], [ 101, 83 ], [ 94, 88 ], [ 95, 92 ], [ 104, 92 ], [ 98, 92 ], [ 113, 92 ], [ 107, 92 ], [ 94, 95 ], [ 97, 98 ], [ 100, 101 ], [ 103, 104 ], [ 106, 107 ], [ 109, 110 ], [ 112, 113 ], [ 115, 116 ] ]
[ "S = input()\n\nNS = 'NS'\nWE = 'WE'\nanswer = 'Yes'\n\nif S.count('N') == 0 and S.count('S') != 0:\n answer = 'No'\nelif S.count('N') != 0 and S.count('S') == 0:\n answer = 'No'\n\nif S.count('W') == 0 and S.count('E') != 0:\n answer = 'No'\nelif S.count('W') != 0 and S.count('E') == 0:\n answer = 'No'\n \nprint(answer)", "S = input()", "S", "input()", "input", "NS = 'NS'", "NS", "'NS'", "WE = 'WE'", "WE", "'WE'", "answer = 'Yes'", "answer", "'Yes'", "if S.count('N') == 0 and S.count('S') != 0:\n answer = 'No'\nelif S.count('N') != 0 and S.count('S') == 0:\n answer = 'No'", "S.count('N') == 0 and S.count('S') != 0", "S.count('N') == 0", "S.count('N')", "S.count", "S", "count", "'N'", "0", "S.count('S') != 0", "S.count('S')", "S.count", "S", "count", "'S'", "0", "answer = 'No'", "answer", "'No'", "elif S.count('N') != 0 and S.count('S') == 0:\n answer = 'No'", "S.count('N') != 0 and S.count('S') == 0", "S.count('N') != 0", "S.count('N')", "S.count", "S", "count", "'N'", "0", "S.count('S') == 0", "S.count('S')", "S.count", "S", "count", "'S'", "0", "answer = 'No'", "answer", "'No'", "if S.count('W') == 0 and S.count('E') != 0:\n answer = 'No'\nelif S.count('W') != 0 and S.count('E') == 0:\n answer = 'No'\n ", "S.count('W') == 0 and S.count('E') != 0", "S.count('W') == 0", "S.count('W')", "S.count", "S", "count", "'W'", "0", "S.count('E') != 0", "S.count('E')", "S.count", "S", "count", "'E'", "0", "answer = 'No'", "answer", "'No'", "elif S.count('W') != 0 and S.count('E') == 0:\n answer = 'No'\n ", "S.count('W') != 0 and S.count('E') == 0", "S.count('W') != 0", "S.count('W')", "S.count", "S", "count", "'W'", "0", "S.count('E') == 0", "S.count('E')", "S.count", "S", "count", "'E'", "0", "answer = 'No'", "answer", "'No'", "print(answer)", "print", "answer", "answer = 'No'", "'No'", "answer", "answer = 'No'", "'No'", "answer", "S = input()", "input()", "S", "answer = 'No'", "'No'", "answer", "answer = 'Yes'", "'Yes'", "answer", "NS = 'NS'", "'NS'", "NS", "answer = 'No'", "'No'", "answer", "WE = 'WE'", "'WE'", "WE" ]
S = input() NS = 'NS' WE = 'WE' answer = 'Yes' if S.count('N') == 0 and S.count('S') != 0: answer = 'No' elif S.count('N') != 0 and S.count('S') == 0: answer = 'No' if S.count('W') == 0 and S.count('E') != 0: answer = 'No' elif S.count('W') != 0 and S.count('E') == 0: answer = 'No' print(answer)
[ 7, 0, 13, 4, 13, 0, 13, 2, 39, 17, 17, 0, 13, 17, 28, 13, 13, 0, 18, 13, 4, 18, 13, 13, 13, 17, 0, 13, 2, 2, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 2, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 0, 13, 2, 2, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 2, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 4, 13, 8, 2, 13, 13, 17, 17, 10, 17, 13, 10, 4, 13, 10, 2, 13, 10, 2, 13, 10, 2, 13 ]
[ [ 88, 2 ], [ 97, 6 ], [ 85, 12 ], [ 16, 15 ], [ 89, 15 ], [ 25, 18 ], [ 98, 19 ], [ 86, 22 ], [ 15, 24 ], [ 94, 27 ], [ 98, 32 ], [ 98, 37 ], [ 98, 43 ], [ 98, 48 ], [ 91, 52 ], [ 98, 57 ], [ 98, 62 ], [ 98, 68 ], [ 98, 73 ], [ 95, 80 ], [ 92, 81 ], [ 85, 86 ], [ 88, 89 ], [ 91, 92 ], [ 94, 95 ], [ 97, 98 ] ]
[ "S = input()\ndir = [0]*4\nmove = \"NWSE\"\nfor i in S:\n dir[move.index(i)] += 1\np1 = (dir[0] > 0 and dir[2] > 0) or (dir[0] == 0 and dir[2] == 0)\np2 = (dir[1] > 0 and dir[3] > 0) or (dir[1] == 0 and dir[3] == 0)\nprint(\"Yes\" if p1 and p2 else \"No\")", "S = input()", "S", "input()", "input", "dir = [0]*4", "dir", "[0]*4", "[0]", "0", "4", "move = \"NWSE\"", "move", "\"NWSE\"", "for i in S:\n dir[move.index(i)] += 1", "i", "S", "dir[move.index(i)] += 1", "dir[move.index(i)]", "dir", "move.index(i)", "move.index", "move", "index", "i", "1", "p1 = (dir[0] > 0 and dir[2] > 0) or (dir[0] == 0 and dir[2] == 0)", "p1", "(dir[0] > 0 and dir[2] > 0) or (dir[0] == 0 and dir[2] == 0)", "dir[0] > 0 and dir[2] > 0", "dir[0] > 0", "dir[0]", "dir", "0", "0", "dir[2] > 0", "dir[2]", "dir", "2", "0", "dir[0] == 0 and dir[2] == 0", "dir[0] == 0", "dir[0]", "dir", "0", "0", "dir[2] == 0", "dir[2]", "dir", "2", "0", "p2 = (dir[1] > 0 and dir[3] > 0) or (dir[1] == 0 and dir[3] == 0)", "p2", "(dir[1] > 0 and dir[3] > 0) or (dir[1] == 0 and dir[3] == 0)", "dir[1] > 0 and dir[3] > 0", "dir[1] > 0", "dir[1]", "dir", "1", "0", "dir[3] > 0", "dir[3]", "dir", "3", "0", "dir[1] == 0 and dir[3] == 0", "dir[1] == 0", "dir[1]", "dir", "1", "0", "dir[3] == 0", "dir[3]", "dir", "3", "0", "print(\"Yes\" if p1 and p2 else \"No\")", "print", "\"Yes\" if p1 and p2 else \"No\"", "p1 and p2", "p1", "p2", "\"Yes\"", "\"No\"", "move = \"NWSE\"", "\"NWSE\"", "move", "S = input()", "input()", "S", "p2 = (dir[1] > 0 and dir[3] > 0) or (dir[1] == 0 and dir[3] == 0)", "(dir[1] > 0 and dir[3] > 0) or (dir[1] == 0 and dir[3] == 0)", "p2", "p1 = (dir[0] > 0 and dir[2] > 0) or (dir[0] == 0 and dir[2] == 0)", "(dir[0] > 0 and dir[2] > 0) or (dir[0] == 0 and dir[2] == 0)", "p1", "dir = [0]*4", "[0]*4", "dir" ]
S = input() dir = [0]*4 move = "NWSE" for i in S: dir[move.index(i)] += 1 p1 = (dir[0] > 0 and dir[2] > 0) or (dir[0] == 0 and dir[2] == 0) p2 = (dir[1] > 0 and dir[3] > 0) or (dir[1] == 0 and dir[3] == 0) print("Yes" if p1 and p2 else "No")
[ 7, 0, 13, 4, 13, 0, 13, 17, 14, 2, 2, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 0, 13, 17, 14, 2, 2, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 0, 13, 17, 14, 13, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 55, 2 ], [ 61, 6 ], [ 56, 13 ], [ 56, 20 ], [ 64, 25 ], [ 56, 32 ], [ 56, 39 ], [ 58, 44 ], [ 55, 56 ], [ 58, 59 ], [ 61, 62 ], [ 64, 65 ] ]
[ "s=input()\npr=True\nif (s.count(\"N\")==0)^(s.count(\"S\")==0):\n pr=False\nif (s.count(\"E\")==0)^(s.count(\"W\")==0):\n pr=False\n\nif pr:\n print(\"Yes\")\nelse:\n print(\"No\")", "s=input()", "s", "input()", "input", "pr=True", "pr", "True", "if (s.count(\"N\")==0)^(s.count(\"S\")==0):\n pr=False", "(s.count(\"N\")==0)^(s.count(\"S\")==0)", "s.count(\"N\")==0", "s.count(\"N\")", "s.count", "s", "count", "\"N\"", "0", "s.count(\"S\")==0", "s.count(\"S\")", "s.count", "s", "count", "\"S\"", "0", "pr=False", "pr", "False", "if (s.count(\"E\")==0)^(s.count(\"W\")==0):\n pr=False", "(s.count(\"E\")==0)^(s.count(\"W\")==0)", "s.count(\"E\")==0", "s.count(\"E\")", "s.count", "s", "count", "\"E\"", "0", "s.count(\"W\")==0", "s.count(\"W\")", "s.count", "s", "count", "\"W\"", "0", "pr=False", "pr", "False", "if pr:\n print(\"Yes\")\nelse:\n print(\"No\")", "pr", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "s=input()", "input()", "s", "pr=False", "False", "pr", "pr=True", "True", "pr", "pr=False", "False", "pr" ]
s=input() pr=True if (s.count("N")==0)^(s.count("S")==0): pr=False if (s.count("E")==0)^(s.count("W")==0): pr=False if pr: print("Yes") else: print("No")
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 0, 13, 4, 18, 13, 13, 17, 14, 2, 2, 13, 13, 2, 40, 13, 17, 40, 13, 17, 14, 2, 2, 13, 13, 2, 40, 13, 17, 40, 13, 17, 4, 13, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 69, 2 ], [ 78, 8 ], [ 70, 11 ], [ 81, 15 ], [ 70, 18 ], [ 72, 22 ], [ 70, 25 ], [ 75, 29 ], [ 70, 32 ], [ 79, 38 ], [ 73, 39 ], [ 79, 42 ], [ 73, 45 ], [ 82, 50 ], [ 76, 51 ], [ 82, 54 ], [ 76, 57 ], [ 69, 70 ], [ 72, 73 ], [ 75, 76 ], [ 78, 79 ], [ 81, 82 ] ]
[ "l = list(input())\nn = l.count('N')\nw = l.count('W')\ns = l.count('S')\ne = l.count('E')\nif n == s or (n != 0 and s != 0):\n if w == e or (w != 0 and e != 0):\n print('Yes')\n exit(0)\nprint('No')", "l = list(input())", "l", "list(input())", "list", "input()", "input", "n = l.count('N')", "n", "l.count('N')", "l.count", "l", "count", "'N'", "w = l.count('W')", "w", "l.count('W')", "l.count", "l", "count", "'W'", "s = l.count('S')", "s", "l.count('S')", "l.count", "l", "count", "'S'", "e = l.count('E')", "e", "l.count('E')", "l.count", "l", "count", "'E'", "if n == s or (n != 0 and s != 0):\n if w == e or (w != 0 and e != 0):\n print('Yes')\n exit(0)", "n == s or (n != 0 and s != 0)", "n == s", "n", "s", "n != 0 and s != 0", "n != 0", "n", "0", "s != 0", "s", "0", "if w == e or (w != 0 and e != 0):\n print('Yes')\n exit(0)", "w == e or (w != 0 and e != 0)", "w == e", "w", "e", "w != 0 and e != 0", "w != 0", "w", "0", "e != 0", "e", "0", "print('Yes')", "print", "'Yes'", "exit(0)", "exit", "0", "print('No')", "print", "'No'", "l = list(input())", "list(input())", "l", "s = l.count('S')", "l.count('S')", "s", "e = l.count('E')", "l.count('E')", "e", "n = l.count('N')", "l.count('N')", "n", "w = l.count('W')", "l.count('W')", "w" ]
l = list(input()) n = l.count('N') w = l.count('W') s = l.count('S') e = l.count('E') if n == s or (n != 0 and s != 0): if w == e or (w != 0 and e != 0): print('Yes') exit(0) print('No')
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 0, 13, 4, 13, 28, 13, 13, 14, 2, 13, 39, 17, 17, 4, 18, 13, 13, 13, 14, 2, 13, 39, 17, 17, 4, 18, 13, 13, 13, 14, 2, 2, 4, 13, 13, 17, 2, 4, 13, 13, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 57, 2 ], [ 63, 6 ], [ 60, 10 ], [ 15, 14 ], [ 58, 14 ], [ 14, 18 ], [ 64, 24 ], [ 14, 26 ], [ 14, 29 ], [ 61, 35 ], [ 14, 37 ], [ 64, 43 ], [ 61, 48 ], [ 57, 58 ], [ 60, 61 ], [ 63, 64 ] ]
[ "S = input()\nNS = set()\nEW = set()\nfor s in S:\n if s in [\"N\", \"S\"]:\n NS.add(s)\n if s in [\"E\", \"W\"]:\n EW.add(s)\nif len(NS) == 1 or len(EW) == 1:\n print(\"No\")\nelse:\n print(\"Yes\")", "S = input()", "S", "input()", "input", "NS = set()", "NS", "set()", "set", "EW = set()", "EW", "set()", "set", "for s in S:\n if s in [\"N\", \"S\"]:\n NS.add(s)\n if s in [\"E\", \"W\"]:\n EW.add(s)", "s", "S", "if s in [\"N\", \"S\"]:\n NS.add(s)\n ", "s in [\"N\", \"S\"]", "s", "[\"N\", \"S\"]", "\"N\"", "\"S\"", "NS.add(s)", "NS.add", "NS", "add", "s", "if s in [\"E\", \"W\"]:\n EW.add(s)", "s in [\"E\", \"W\"]", "s", "[\"E\", \"W\"]", "\"E\"", "\"W\"", "EW.add(s)", "EW.add", "EW", "add", "s", "if len(NS) == 1 or len(EW) == 1:\n print(\"No\")\nelse:\n print(\"Yes\")", "len(NS) == 1 or len(EW) == 1", "len(NS) == 1", "len(NS)", "len", "NS", "1", "len(EW) == 1", "len(EW)", "len", "EW", "1", "print(\"No\")", "print", "\"No\"", "print(\"Yes\")", "print", "\"Yes\"", "S = input()", "input()", "S", "EW = set()", "set()", "EW", "NS = set()", "set()", "NS" ]
S = input() NS = set() EW = set() for s in S: if s in ["N", "S"]: NS.add(s) if s in ["E", "W"]: EW.add(s) if len(NS) == 1 or len(EW) == 1: print("No") else: print("Yes")
[ 7, 15, 12, 13, 0, 13, 4, 13, 13, 14, 2, 4, 13, 13, 17, 29, 17, 14, 2, 2, 2, 2, 18, 13, 17, 18, 13, 17, 17, 2, 2, 18, 13, 17, 18, 13, 17, 17, 2, 2, 2, 18, 13, 17, 18, 13, 17, 17, 2, 2, 18, 13, 17, 18, 13, 17, 17, 29, 17, 29, 17, 23, 13, 12, 13, 0, 13, 4, 13, 4, 13, 4, 13, 13, 14, 2, 13, 17, 4, 13, 10, 12, 13, 10, 12, 13 ]
[ [ 6, 5 ], [ 62, 8 ], [ 62, 13 ], [ 5, 23 ], [ 5, 26 ], [ 5, 32 ], [ 5, 35 ], [ 5, 42 ], [ 5, 45 ], [ 5, 51 ], [ 5, 54 ], [ 62, 62 ], [ 67, 66 ], [ 82, 72 ], [ 66, 73 ], [ 85, 79 ] ]
[ "#!/usr/bin/env python3\nfrom collections import Counter\n\ndef solve(S):\n s = Counter(S)\n if len(S) == 1:\n return \"No\"\n elif (s[\"N\"]*s[\"S\"] == 0 and s[\"N\"]+s[\"S\"] > 0) or \\\n (s[\"E\"]*s[\"W\"] == 0 and s[\"E\"]+s[\"W\"] > 0):\n return \"No\"\n else:\n return \"Yes\"\n\ndef main():\n S = input()\n print(solve(S))\n\nif __name__ == '__main__':\n main()", "from collections import Counter", "def solve(S):\n s = Counter(S)\n if len(S) == 1:\n return \"No\"\n elif (s[\"N\"]*s[\"S\"] == 0 and s[\"N\"]+s[\"S\"] > 0) or \\\n (s[\"E\"]*s[\"W\"] == 0 and s[\"E\"]+s[\"W\"] > 0):\n return \"No\"\n else:\n return \"Yes\"", "solve", "s = Counter(S)", "s", "Counter(S)", "Counter", "S", "if len(S) == 1:\n return \"No\"\n elif (s[\"N\"]*s[\"S\"] == 0 and s[\"N\"]+s[\"S\"] > 0) or \\\n (s[\"E\"]*s[\"W\"] == 0 and s[\"E\"]+s[\"W\"] > 0):\n return \"No\"\n else:\n return \"Yes\"", "len(S) == 1", "len(S)", "len", "S", "1", "return \"No\"", "\"No\"", "elif (s[\"N\"]*s[\"S\"] == 0 and s[\"N\"]+s[\"S\"] > 0) or \\\n (s[\"E\"]*s[\"W\"] == 0 and s[\"E\"]+s[\"W\"] > 0):\n return \"No\"\n ", "(s[\"N\"]*s[\"S\"] == 0 and s[\"N\"]+s[\"S\"] > 0) or \\\n (s[\"E\"]*s[\"W\"] == 0 and s[\"E\"]+s[\"W\"] > 0)", "s[\"N\"]*s[\"S\"] == 0 and s[\"N\"]+s[\"S\"] > 0", "s[\"N\"]*s[\"S\"] == 0", "s[\"N\"]*s[\"S\"]", "s[\"N\"]", "s", "\"N\"", "s[\"S\"]", "s", "\"S\"", "0", "s[\"N\"]+s[\"S\"] > 0", "s[\"N\"]+s[\"S\"]", "s[\"N\"]", "s", "\"N\"", "s[\"S\"]", "s", "\"S\"", "0", "s[\"E\"]*s[\"W\"] == 0 and s[\"E\"]+s[\"W\"] > 0", "s[\"E\"]*s[\"W\"] == 0", "s[\"E\"]*s[\"W\"]", "s[\"E\"]", "s", "\"E\"", "s[\"W\"]", "s", "\"W\"", "0", "s[\"E\"]+s[\"W\"] > 0", "s[\"E\"]+s[\"W\"]", "s[\"E\"]", "s", "\"E\"", "s[\"W\"]", "s", "\"W\"", "0", "return \"No\"", "\"No\"", "return \"Yes\"", "\"Yes\"", "S", "S", "def main():\n S = input()\n print(solve(S))", "main", "S = input()", "S", "input()", "input", "print(solve(S))", "print", "solve(S)", "solve", "S", "if __name__ == '__main__':\n main()", "__name__ == '__main__'", "__name__", "'__main__'", "main()", "main", "def solve(S):\n s = Counter(S)\n if len(S) == 1:\n return \"No\"\n elif (s[\"N\"]*s[\"S\"] == 0 and s[\"N\"]+s[\"S\"] > 0) or \\\n (s[\"E\"]*s[\"W\"] == 0 and s[\"E\"]+s[\"W\"] > 0):\n return \"No\"\n else:\n return \"Yes\"", "def solve(S):\n s = Counter(S)\n if len(S) == 1:\n return \"No\"\n elif (s[\"N\"]*s[\"S\"] == 0 and s[\"N\"]+s[\"S\"] > 0) or \\\n (s[\"E\"]*s[\"W\"] == 0 and s[\"E\"]+s[\"W\"] > 0):\n return \"No\"\n else:\n return \"Yes\"", "solve", "def main():\n S = input()\n print(solve(S))", "def main():\n S = input()\n print(solve(S))", "main" ]
#!/usr/bin/env python3 from collections import Counter def solve(S): s = Counter(S) if len(S) == 1: return "No" elif (s["N"]*s["S"] == 0 and s["N"]+s["S"] > 0) or \ (s["E"]*s["W"] == 0 and s["E"]+s["W"] > 0): return "No" else: return "Yes" def main(): S = input() print(solve(S)) if __name__ == '__main__': main()
[ 7, 0, 13, 4, 13, 0, 13, 2, 39, 17, 17, 28, 13, 4, 13, 4, 13, 13, 14, 2, 18, 13, 13, 17, 0, 18, 13, 17, 17, 14, 2, 18, 13, 13, 17, 0, 18, 13, 17, 17, 14, 2, 18, 13, 13, 17, 0, 18, 13, 17, 17, 0, 18, 13, 17, 17, 4, 13, 8, 2, 2, 18, 13, 17, 18, 13, 17, 2, 18, 13, 17, 18, 13, 17, 17, 17, 10, 2, 13, 10, 4, 13 ]
[ [ 80, 2 ], [ 77, 6 ], [ 13, 12 ], [ 81, 17 ], [ 81, 21 ], [ 12, 22 ], [ 28, 25 ], [ 78, 26 ], [ 81, 32 ], [ 12, 33 ], [ 39, 36 ], [ 78, 37 ], [ 81, 43 ], [ 12, 44 ], [ 50, 47 ], [ 78, 48 ], [ 55, 52 ], [ 78, 53 ], [ 78, 62 ], [ 78, 65 ], [ 78, 69 ], [ 78, 72 ], [ 77, 78 ], [ 80, 81 ] ]
[ "s = input()\nflag = [0] * 4\nfor i in range(len(s)):\n if s[i] == \"N\":\n flag[0] = 1\n elif s[i] == \"W\":\n flag[1] = 1\n elif s[i] == \"S\":\n flag[2] = 1\n else:\n flag[3] = 1\n\nprint(\"Yes\" if flag[0] == flag[2] and flag[1] == flag[3] else \"No\")", "s = input()", "s", "input()", "input", "flag = [0] * 4", "flag", "[0] * 4", "[0]", "0", "4", "for i in range(len(s)):\n if s[i] == \"N\":\n flag[0] = 1\n elif s[i] == \"W\":\n flag[1] = 1\n elif s[i] == \"S\":\n flag[2] = 1\n else:\n flag[3] = 1", "i", "range(len(s))", "range", "len(s)", "len", "s", "if s[i] == \"N\":\n flag[0] = 1\n elif s[i] == \"W\":\n flag[1] = 1\n elif s[i] == \"S\":\n flag[2] = 1\n else:\n flag[3] = 1", "s[i] == \"N\"", "s[i]", "s", "i", "\"N\"", "flag[0] = 1", "flag[0]", "flag", "0", "1", "elif s[i] == \"W\":\n flag[1] = 1\n ", "s[i] == \"W\"", "s[i]", "s", "i", "\"W\"", "flag[1] = 1", "flag[1]", "flag", "1", "1", "elif s[i] == \"S\":\n flag[2] = 1\n ", "s[i] == \"S\"", "s[i]", "s", "i", "\"S\"", "flag[2] = 1", "flag[2]", "flag", "2", "1", "flag[3] = 1", "flag[3]", "flag", "3", "1", "print(\"Yes\" if flag[0] == flag[2] and flag[1] == flag[3] else \"No\")", "print", "\"Yes\" if flag[0] == flag[2] and flag[1] == flag[3] else \"No\"", "flag[0] == flag[2] and flag[1] == flag[3]", "flag[0] == flag[2]", "flag[0]", "flag", "0", "flag[2]", "flag", "2", "flag[1] == flag[3]", "flag[1]", "flag", "1", "flag[3]", "flag", "3", "\"Yes\"", "\"No\"", "flag = [0] * 4", "[0] * 4", "flag", "s = input()", "input()", "s" ]
s = input() flag = [0] * 4 for i in range(len(s)): if s[i] == "N": flag[0] = 1 elif s[i] == "W": flag[1] = 1 elif s[i] == "S": flag[2] = 1 else: flag[3] = 1 print("Yes" if flag[0] == flag[2] and flag[1] == flag[3] else "No")
[ 7, 0, 13, 4, 13, 4, 13, 4, 13, 14, 2, 17, 13, 14, 40, 2, 17, 13, 4, 13, 17, 4, 13, 14, 2, 2, 4, 13, 13, 17, 2, 4, 13, 13, 17, 4, 13, 17, 4, 13, 14, 2, 17, 13, 14, 40, 2, 17, 13, 4, 13, 17, 4, 13, 14, 2, 2, 4, 13, 13, 17, 2, 4, 13, 13, 17, 4, 13, 17, 4, 13, 14, 2, 17, 13, 14, 40, 2, 17, 13, 4, 13, 17, 4, 13, 14, 2, 2, 4, 13, 13, 17, 2, 4, 13, 13, 17, 4, 13, 17, 4, 13, 14, 2, 17, 13, 14, 40, 2, 17, 13, 4, 13, 17, 4, 13, 14, 2, 2, 4, 13, 13, 17, 2, 4, 13, 13, 17, 4, 13, 17, 4, 13, 4, 13, 17, 10, 4, 13 ]
[ [ 137, 2 ], [ 138, 12 ], [ 138, 17 ], [ 138, 28 ], [ 138, 33 ], [ 138, 43 ], [ 138, 48 ], [ 138, 59 ], [ 138, 64 ], [ 138, 74 ], [ 138, 79 ], [ 138, 90 ], [ 138, 95 ], [ 138, 105 ], [ 138, 110 ], [ 138, 121 ], [ 138, 126 ], [ 137, 138 ] ]
[ "s = set(list(input()))\n\nif 'N' in s:\n if not 'S' in s:\n print(\"No\")\n exit()\n elif len(s) == 2 or len(s)==4:\n print(\"Yes\")\n exit()\n \nif 'S' in s:\n if not 'N' in s:\n print(\"No\")\n exit()\n elif len(s) == 2 or len(s)==4:\n print(\"Yes\")\n exit()\n\nif 'W' in s:\n if not 'E' in s:\n print(\"No\")\n exit()\n elif len(s) == 2 or len(s)==4:\n print(\"Yes\")\n exit()\n\nif 'E' in s:\n if not 'W' in s:\n print(\"No\")\n exit()\n elif len(s) == 2 or len(s)==4:\n print(\"Yes\")\n exit()\n \nprint(\"No\")", "s = set(list(input()))", "s", "set(list(input()))", "set", "list(input())", "list", "input()", "input", "if 'N' in s:\n if not 'S' in s:\n print(\"No\")\n exit()\n elif len(s) == 2 or len(s)==4:\n print(\"Yes\")\n exit()\n ", "'N' in s", "'N'", "s", "if not 'S' in s:\n print(\"No\")\n exit()\n elif len(s) == 2 or len(s)==4:\n print(\"Yes\")\n exit()\n ", "not 'S' in s", "'S' in s", "'S'", "s", "print(\"No\")", "print", "\"No\"", "exit()", "exit", "elif len(s) == 2 or len(s)==4:\n print(\"Yes\")\n exit()\n ", "len(s) == 2 or len(s)==4", "len(s) == 2", "len(s)", "len", "s", "2", "len(s)==4", "len(s)", "len", "s", "4", "print(\"Yes\")", "print", "\"Yes\"", "exit()", "exit", "if 'S' in s:\n if not 'N' in s:\n print(\"No\")\n exit()\n elif len(s) == 2 or len(s)==4:\n print(\"Yes\")\n exit()", "'S' in s", "'S'", "s", "if not 'N' in s:\n print(\"No\")\n exit()\n elif len(s) == 2 or len(s)==4:\n print(\"Yes\")\n exit()", "not 'N' in s", "'N' in s", "'N'", "s", "print(\"No\")", "print", "\"No\"", "exit()", "exit", "elif len(s) == 2 or len(s)==4:\n print(\"Yes\")\n exit()", "len(s) == 2 or len(s)==4", "len(s) == 2", "len(s)", "len", "s", "2", "len(s)==4", "len(s)", "len", "s", "4", "print(\"Yes\")", "print", "\"Yes\"", "exit()", "exit", "if 'W' in s:\n if not 'E' in s:\n print(\"No\")\n exit()\n elif len(s) == 2 or len(s)==4:\n print(\"Yes\")\n exit()", "'W' in s", "'W'", "s", "if not 'E' in s:\n print(\"No\")\n exit()\n elif len(s) == 2 or len(s)==4:\n print(\"Yes\")\n exit()", "not 'E' in s", "'E' in s", "'E'", "s", "print(\"No\")", "print", "\"No\"", "exit()", "exit", "elif len(s) == 2 or len(s)==4:\n print(\"Yes\")\n exit()", "len(s) == 2 or len(s)==4", "len(s) == 2", "len(s)", "len", "s", "2", "len(s)==4", "len(s)", "len", "s", "4", "print(\"Yes\")", "print", "\"Yes\"", "exit()", "exit", "if 'E' in s:\n if not 'W' in s:\n print(\"No\")\n exit()\n elif len(s) == 2 or len(s)==4:\n print(\"Yes\")\n exit()\n ", "'E' in s", "'E'", "s", "if not 'W' in s:\n print(\"No\")\n exit()\n elif len(s) == 2 or len(s)==4:\n print(\"Yes\")\n exit()\n ", "not 'W' in s", "'W' in s", "'W'", "s", "print(\"No\")", "print", "\"No\"", "exit()", "exit", "elif len(s) == 2 or len(s)==4:\n print(\"Yes\")\n exit()\n ", "len(s) == 2 or len(s)==4", "len(s) == 2", "len(s)", "len", "s", "2", "len(s)==4", "len(s)", "len", "s", "4", "print(\"Yes\")", "print", "\"Yes\"", "exit()", "exit", "print(\"No\")", "print", "\"No\"", "s = set(list(input()))", "set(list(input()))", "s" ]
s = set(list(input())) if 'N' in s: if not 'S' in s: print("No") exit() elif len(s) == 2 or len(s)==4: print("Yes") exit() if 'S' in s: if not 'N' in s: print("No") exit() elif len(s) == 2 or len(s)==4: print("Yes") exit() if 'W' in s: if not 'E' in s: print("No") exit() elif len(s) == 2 or len(s)==4: print("Yes") exit() if 'E' in s: if not 'W' in s: print("No") exit() elif len(s) == 2 or len(s)==4: print("Yes") exit() print("No")
[ 7, 12, 13, 15, 13, 0, 13, 18, 18, 13, 13, 13, 0, 13, 4, 18, 4, 13, 13, 0, 13, 2, 17, 13, 0, 13, 2, 17, 13, 0, 13, 2, 17, 13, 0, 13, 2, 17, 13, 14, 2, 2, 13, 13, 2, 13, 13, 4, 13, 17, 4, 13, 17, 14, 2, 13, 17, 4, 13, 10, 12, 13 ]
[ [ 7, 6 ], [ 14, 13 ], [ 6, 17 ], [ 21, 20 ], [ 13, 23 ], [ 26, 25 ], [ 13, 28 ], [ 31, 30 ], [ 13, 33 ], [ 36, 35 ], [ 13, 38 ], [ 20, 42 ], [ 25, 43 ], [ 30, 45 ], [ 35, 46 ], [ 61, 58 ] ]
[ "# row = [int(x) for x in input().rstrip().split(\" \")]\n# n = int(input().rstrip())\n# s = input().rstrip()\n\ndef resolve():\n import sys\n input = sys.stdin.readline\n\n se = input().rstrip()\n\n S = \"S\" in se\n N = \"N\" in se\n E = \"E\" in se\n W = \"W\" in se\n\n if (S ^ N) or (E ^ W):\n print(\"No\")\n else:\n print(\"Yes\")\n\n\nif __name__ == \"__main__\":\n resolve()", "def resolve():\n import sys\n input = sys.stdin.readline\n\n se = input().rstrip()\n\n S = \"S\" in se\n N = \"N\" in se\n E = \"E\" in se\n W = \"W\" in se\n\n if (S ^ N) or (E ^ W):\n print(\"No\")\n else:\n print(\"Yes\")", "resolve", "import sys", "sys", "input = sys.stdin.readline", "input", "sys.stdin.readline", "sys.stdin", "sys", "stdin", "readline", "se = input().rstrip()", "se", "input().rstrip()", "().rstrip", "()", "input", "rstrip", "S = \"S\" in se", "S", "\"S\" in se", "\"S\"", "se", "N = \"N\" in se", "N", "\"N\" in se", "\"N\"", "se", "E = \"E\" in se", "E", "\"E\" in se", "\"E\"", "se", "W = \"W\" in se", "W", "\"W\" in se", "\"W\"", "se", "if (S ^ N) or (E ^ W):\n print(\"No\")\n else:\n print(\"Yes\")", "(S ^ N) or (E ^ W)", "S ^ N", "S", "N", "E ^ W", "E", "W", "print(\"No\")", "print", "\"No\"", "print(\"Yes\")", "print", "\"Yes\"", "if __name__ == \"__main__\":\n resolve()", "__name__ == \"__main__\"", "__name__", "\"__main__\"", "resolve()", "resolve", "def resolve():\n import sys\n input = sys.stdin.readline\n\n se = input().rstrip()\n\n S = \"S\" in se\n N = \"N\" in se\n E = \"E\" in se\n W = \"W\" in se\n\n if (S ^ N) or (E ^ W):\n print(\"No\")\n else:\n print(\"Yes\")", "def resolve():\n import sys\n input = sys.stdin.readline\n\n se = input().rstrip()\n\n S = \"S\" in se\n N = \"N\" in se\n E = \"E\" in se\n W = \"W\" in se\n\n if (S ^ N) or (E ^ W):\n print(\"No\")\n else:\n print(\"Yes\")", "resolve" ]
# row = [int(x) for x in input().rstrip().split(" ")] # n = int(input().rstrip()) # s = input().rstrip() def resolve(): import sys input = sys.stdin.readline se = input().rstrip() S = "S" in se N = "N" in se E = "E" in se W = "W" in se if (S ^ N) or (E ^ W): print("No") else: print("Yes") if __name__ == "__main__": resolve()