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, 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, 4, 13, 10, 2, 13, 10, 2, 13, 10, 2, 13 ]
[ [ 43, 2 ], [ 46, 6 ], [ 44, 9 ], [ 49, 11 ], [ 44, 14 ], [ 52, 16 ], [ 44, 19 ], [ 40, 21 ], [ 44, 24 ], [ 47, 28 ], [ 41, 29 ], [ 53, 31 ], [ 50, 32 ], [ 40, 41 ], [ 43, 44 ], [ 46, 47 ], [ 49, 50 ], [ 52, 53 ] ]
[ "S=input()\nn=\"N\" in S\nw=\"W\" in S\ne=\"E\" in S\ns=\"S\" in S\nif (n == s) and (e == w):\n print(\"Yes\")\nelse:\n print(\"No\")", "S=input()", "S", "input()", "input", "n=\"N\" in S", "n", "\"N\" in S", "\"N\"", "S", "w=\"W\" in S", "w", "\"W\" in S", "\"W\"", "S", "e=\"E\" in S", "e", "\"E\" in S", "\"E\"", "S", "s=\"S\" in S", "s", "\"S\" in S", "\"S\"", "S", "if (n == s) and (e == w):\n print(\"Yes\")\nelse:\n print(\"No\")", "(n == s) and (e == w)", "n == s", "n", "s", "e == w", "e", "w", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "s=\"S\" in S", "\"S\" in S", "s", "S=input()", "input()", "S", "n=\"N\" in S", "\"N\" in S", "n", "w=\"W\" in S", "\"W\" in S", "w", "e=\"E\" in S", "\"E\" in S", "e" ]
S=input() n="N" in S w="W" in S e="E" in S s="S" in S if (n == s) and (e == w): print("Yes") else: print("No")
[ 7, 15, 13, 0, 13, 18, 18, 13, 13, 13, 12, 13, 0, 13, 4, 18, 4, 13, 13, 0, 13, 4, 13, 13, 0, 13, 17, 0, 13, 17, 0, 13, 17, 14, 2, 13, 4, 13, 13, 4, 13, 17, 14, 2, 13, 4, 13, 13, 4, 13, 17, 14, 2, 13, 4, 13, 13, 4, 13, 17, 4, 13, 17, 14, 2, 13, 17, 4, 13, 10, 18, 13, 10, 12, 13 ]
[ [ 70, 4 ], [ 14, 13 ], [ 71, 17 ], [ 21, 20 ], [ 13, 23 ], [ 26, 25 ], [ 29, 28 ], [ 32, 31 ], [ 20, 35 ], [ 13, 35 ], [ 25, 38 ], [ 20, 44 ], [ 13, 44 ], [ 28, 47 ], [ 20, 53 ], [ 13, 53 ], [ 31, 56 ], [ 74, 68 ], [ 70, 71 ] ]
[ "#-*-coding:utf-8-*-\nimport sys\ninput=sys.stdin.readline\n\ndef main():\n#方角が南北/東西でセットであればよさげ\n s = input().rstrip()\n s = set(s)\n WE={'W','E'}\n NS={'N','S'}\n all_direction={'N', 'E', 'S', 'W'}\n\n if s == set(WE):\n print(\"Yes\")\n elif s == set(NS):\n print(\"Yes\") \n elif s == set(all_direction):\n print(\"Yes\")\n else:\n print(\"No\")\n\nif __name__==\"__main__\":\n main()", "import sys", "sys", "input=sys.stdin.readline", "input", "sys.stdin.readline", "sys.stdin", "sys", "stdin", "readline", "def main():\n#方角が南北/東西でセットであればよさげ\n s = input().rstrip()\n s = set(s)\n WE={'W','E'}\n NS={'N','S'}\n all_direction={'N', 'E', 'S', 'W'}\n\n if s == set(WE):\n print(\"Yes\")\n elif s == set(NS):\n print(\"Yes\") \n elif s == set(all_direction):\n print(\"Yes\")\n else:\n print(\"No\")", "main", "s = input().rstrip()", "s", "input().rstrip()", "().rstrip", "()", "input", "rstrip", "s = set(s)", "s", "set(s)", "set", "s", "WE={'W','E'}", "WE", "{'W','E'}", "NS={'N','S'}", "NS", "{'N','S'}", "all_direction={'N', 'E', 'S', 'W'}", "all_direction", "{'N', 'E', 'S', 'W'}", "if s == set(WE):\n print(\"Yes\")\n elif s == set(NS):\n print(\"Yes\") \n elif s == set(all_direction):\n print(\"Yes\")\n else:\n print(\"No\")", "s == set(WE)", "s", "set(WE)", "set", "WE", "print(\"Yes\")", "print", "\"Yes\"", "elif s == set(NS):\n print(\"Yes\") \n ", "s == set(NS)", "s", "set(NS)", "set", "NS", "print(\"Yes\")", "print", "\"Yes\"", "elif s == set(all_direction):\n print(\"Yes\")\n ", "s == set(all_direction)", "s", "set(all_direction)", "set", "all_direction", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "if __name__==\"__main__\":\n main()", "__name__==\"__main__\"", "__name__", "\"__main__\"", "main()", "main", "input=sys.stdin.readline", "sys.stdin.readline", "input", "def main():\n#方角が南北/東西でセットであればよさげ\n s = input().rstrip()\n s = set(s)\n WE={'W','E'}\n NS={'N','S'}\n all_direction={'N', 'E', 'S', 'W'}\n\n if s == set(WE):\n print(\"Yes\")\n elif s == set(NS):\n print(\"Yes\") \n elif s == set(all_direction):\n print(\"Yes\")\n else:\n print(\"No\")", "def main():\n#方角が南北/東西でセットであればよさげ\n s = input().rstrip()\n s = set(s)\n WE={'W','E'}\n NS={'N','S'}\n all_direction={'N', 'E', 'S', 'W'}\n\n if s == set(WE):\n print(\"Yes\")\n elif s == set(NS):\n print(\"Yes\") \n elif s == set(all_direction):\n print(\"Yes\")\n else:\n print(\"No\")", "main" ]
#-*-coding:utf-8-*- import sys input=sys.stdin.readline def main(): #方角が南北/東西でセットであればよさげ s = input().rstrip() s = set(s) WE={'W','E'} NS={'N','S'} all_direction={'N', 'E', 'S', 'W'} if s == set(WE): print("Yes") elif s == set(NS): print("Yes") elif s == set(all_direction): print("Yes") else: print("No") if __name__=="__main__": main()
[ 7, 15, 13, 0, 13, 4, 13, 0, 13, 4, 18, 13, 13, 13, 0, 13, 17, 14, 2, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 0, 13, 17, 14, 2, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 0, 13, 17, 4, 13, 8, 13, 17, 17, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 60, 4 ], [ 57, 8 ], [ 61, 13 ], [ 54, 15 ], [ 58, 21 ], [ 58, 26 ], [ 63, 30 ], [ 58, 36 ], [ 58, 41 ], [ 66, 45 ], [ 67, 50 ], [ 64, 50 ], [ 55, 50 ], [ 54, 55 ], [ 57, 58 ], [ 60, 61 ], [ 63, 64 ], [ 66, 67 ] ]
[ "import collections\ns = input()\n\ncnt = collections.Counter(s)\n\ncond = True\n\nif (cnt[\"N\"] > 0) ^ (cnt[\"S\"] > 0):\n cond = False\nif (cnt[\"W\"] > 0) ^ (cnt[\"E\"] > 0):\n cond = False\n\nprint(\"Yes\" if cond else \"No\")", "import collections", "collections", "s = input()", "s", "input()", "input", "cnt = collections.Counter(s)", "cnt", "collections.Counter(s)", "collections.Counter", "collections", "Counter", "s", "cond = True", "cond", "True", "if (cnt[\"N\"] > 0) ^ (cnt[\"S\"] > 0):\n cond = False", "(cnt[\"N\"] > 0) ^ (cnt[\"S\"] > 0)", "cnt[\"N\"] > 0", "cnt[\"N\"]", "cnt", "\"N\"", "0", "cnt[\"S\"] > 0", "cnt[\"S\"]", "cnt", "\"S\"", "0", "cond = False", "cond", "False", "if (cnt[\"W\"] > 0) ^ (cnt[\"E\"] > 0):\n cond = False", "(cnt[\"W\"] > 0) ^ (cnt[\"E\"] > 0)", "cnt[\"W\"] > 0", "cnt[\"W\"]", "cnt", "\"W\"", "0", "cnt[\"E\"] > 0", "cnt[\"E\"]", "cnt", "\"E\"", "0", "cond = False", "cond", "False", "print(\"Yes\" if cond else \"No\")", "print", "\"Yes\" if cond else \"No\"", "cond", "\"Yes\"", "\"No\"", "cond = True", "True", "cond", "cnt = collections.Counter(s)", "collections.Counter(s)", "cnt", "s = input()", "input()", "s", "cond = False", "False", "cond", "cond = False", "False", "cond" ]
import collections s = input() cnt = collections.Counter(s) cond = True if (cnt["N"] > 0) ^ (cnt["S"] > 0): cond = False if (cnt["W"] > 0) ^ (cnt["E"] > 0): cond = False print("Yes" if cond else "No")
[ 7, 0, 13, 4, 13, 0, 13, 40, 4, 18, 13, 13, 17, 17, 0, 13, 40, 4, 18, 13, 13, 17, 17, 0, 13, 40, 4, 18, 13, 13, 17, 17, 0, 13, 40, 4, 18, 13, 13, 17, 17, 14, 2, 2, 2, 13, 13, 2, 40, 13, 40, 13, 2, 2, 13, 13, 2, 40, 13, 40, 13, 4, 13, 17, 4, 13, 17, 10, 40, 13, 10, 40, 13, 10, 40, 13, 10, 40, 13, 10, 4, 13 ]
[ [ 80, 2 ], [ 74, 6 ], [ 81, 10 ], [ 77, 15 ], [ 81, 19 ], [ 71, 24 ], [ 81, 28 ], [ 68, 33 ], [ 81, 37 ], [ 75, 45 ], [ 78, 46 ], [ 75, 49 ], [ 78, 51 ], [ 72, 54 ], [ 69, 55 ], [ 72, 58 ], [ 69, 60 ], [ 68, 69 ], [ 71, 72 ], [ 74, 75 ], [ 77, 78 ], [ 80, 81 ] ]
[ "S=input()\nhasN = S.find('N') >= 0\nhasS = S.find('S') >= 0\nhasE = S.find('E') >= 0\nhasW = S.find('W') >= 0\nif (hasN and hasS or not hasN and not hasS) and (hasE and hasW or not hasE and not hasW):\n print('Yes')\nelse:\n print('No')", "S=input()", "S", "input()", "input", "hasN = S.find('N') >= 0", "hasN", "S.find('N') >= 0", "S.find('N')", "S.find", "S", "find", "'N'", "0", "hasS = S.find('S') >= 0", "hasS", "S.find('S') >= 0", "S.find('S')", "S.find", "S", "find", "'S'", "0", "hasE = S.find('E') >= 0", "hasE", "S.find('E') >= 0", "S.find('E')", "S.find", "S", "find", "'E'", "0", "hasW = S.find('W') >= 0", "hasW", "S.find('W') >= 0", "S.find('W')", "S.find", "S", "find", "'W'", "0", "if (hasN and hasS or not hasN and not hasS) and (hasE and hasW or not hasE and not hasW):\n print('Yes')\nelse:\n print('No')", "(hasN and hasS or not hasN and not hasS) and (hasE and hasW or not hasE and not hasW)", "hasN and hasS or not hasN and not hasS", "hasN and hasS", "hasN", "hasS", "not hasN and not hasS", "not hasN", "hasN", "not hasS", "hasS", "hasE and hasW or not hasE and not hasW", "hasE and hasW", "hasE", "hasW", "not hasE and not hasW", "not hasE", "hasE", "not hasW", "hasW", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "hasW = S.find('W') >= 0", "S.find('W') >= 0", "hasW", "hasE = S.find('E') >= 0", "S.find('E') >= 0", "hasE", "hasN = S.find('N') >= 0", "S.find('N') >= 0", "hasN", "hasS = S.find('S') >= 0", "S.find('S') >= 0", "hasS", "S=input()", "input()", "S" ]
S=input() hasN = S.find('N') >= 0 hasS = S.find('S') >= 0 hasE = S.find('E') >= 0 hasW = S.find('W') >= 0 if (hasN and hasS or not hasN and not hasS) and (hasE and hasW or not hasE and not hasW): print('Yes') else: print('No')
[ 7, 0, 13, 4, 13, 0, 13, 17, 41, 28, 13, 4, 13, 17, 4, 17, 0, 13, 13, 28, 13, 13, 28, 13, 4, 13, 17, 14, 2, 13, 18, 13, 13, 0, 18, 13, 13, 17, 3, 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, 13, 13, 10, 17, 13 ]
[ [ 62, 2 ], [ 68, 6 ], [ 11, 10 ], [ 65, 17 ], [ 21, 20 ], [ 63, 20 ], [ 24, 23 ], [ 20, 29 ], [ 69, 31 ], [ 23, 32 ], [ 37, 34 ], [ 66, 35 ], [ 23, 36 ], [ 66, 43 ], [ 66, 46 ], [ 66, 50 ], [ 66, 53 ], [ 62, 63 ], [ 65, 66 ], [ 68, 69 ] ]
[ "string = input()\nnews = \"NEWS\"\nflg = [False for _ in range(4)]\nfor s in string:\n for i in range(4):\n if s == news[i]:\n flg[i] = True\n break\nif flg[0] != flg[3] or flg[1] != flg[2]:\n print(\"No\")\nelse:\n print(\"Yes\")", "string = input()", "string", "input()", "input", "news = \"NEWS\"", "news", "\"NEWS\"", "False for _ in range(4)", "for _ in range(4)", "_", "range(4)", "range", "4", "for _ in range(4)", "False", "flg = [False for _ in range(4)]", "flg", "[False for _ in range(4)]", "for s in string:\n for i in range(4):\n if s == news[i]:\n flg[i] = True\n break", "s", "string", "for i in range(4):\n if s == news[i]:\n flg[i] = True\n break", "i", "range(4)", "range", "4", "if s == news[i]:\n flg[i] = True\n break", "s == news[i]", "s", "news[i]", "news", "i", "flg[i] = True", "flg[i]", "flg", "i", "True", "break", "if flg[0] != flg[3] or flg[1] != flg[2]:\n print(\"No\")\nelse:\n print(\"Yes\")", "flg[0] != flg[3] or flg[1] != flg[2]", "flg[0] != flg[3]", "flg[0]", "flg", "0", "flg[3]", "flg", "3", "flg[1] != flg[2]", "flg[1]", "flg", "1", "flg[2]", "flg", "2", "print(\"No\")", "print", "\"No\"", "print(\"Yes\")", "print", "\"Yes\"", "string = input()", "input()", "string", "flg = [False for _ in range(4)]", "[False for _ in range(4)]", "flg", "news = \"NEWS\"", "\"NEWS\"", "news" ]
string = input() news = "NEWS" flg = [False for _ in range(4)] for s in string: for i in range(4): if s == news[i]: flg[i] = True break if flg[0] != flg[3] or flg[1] != flg[2]: print("No") else: print("Yes")
[ 7, 15, 13, 0, 13, 18, 18, 13, 13, 13, 15, 12, 13, 0, 13, 4, 18, 4, 13, 13, 0, 13, 4, 13, 13, 0, 13, 18, 13, 17, 0, 13, 18, 13, 17, 0, 13, 18, 13, 17, 0, 13, 18, 13, 17, 14, 2, 2, 40, 13, 17, 40, 13, 17, 2, 2, 13, 17, 2, 13, 17, 14, 2, 2, 40, 13, 17, 40, 13, 17, 2, 2, 13, 17, 2, 13, 17, 4, 13, 17, 4, 13, 17, 4, 13, 17, 14, 2, 13, 17, 4, 13, 10, 12, 13, 10, 18, 13 ]
[ [ 96, 4 ], [ 15, 14 ], [ 97, 18 ], [ 22, 21 ], [ 14, 24 ], [ 27, 26 ], [ 21, 28 ], [ 32, 31 ], [ 21, 33 ], [ 37, 36 ], [ 21, 38 ], [ 42, 41 ], [ 21, 43 ], [ 26, 49 ], [ 31, 52 ], [ 26, 56 ], [ 31, 59 ], [ 36, 65 ], [ 41, 68 ], [ 36, 72 ], [ 41, 75 ], [ 94, 91 ], [ 96, 97 ] ]
[ "import sys\ninput = sys.stdin.readline\nfrom collections import Counter\ndef main():\n S = input().rstrip()\n C = Counter(S)\n n = C['N']\n s = C['S']\n w = C['W']\n e = C['E']\n if (n != 0 and s != 0) or (n == 0 and s == 0):\n if (w != 0 and e != 0) or (w == 0 and e == 0):\n print('Yes')\n else:\n print('No')\n else:\n print('No')\n\nif __name__ == '__main__':\n main()", "import sys", "sys", "input = sys.stdin.readline", "input", "sys.stdin.readline", "sys.stdin", "sys", "stdin", "readline", "from collections import Counter", "def main():\n S = input().rstrip()\n C = Counter(S)\n n = C['N']\n s = C['S']\n w = C['W']\n e = C['E']\n if (n != 0 and s != 0) or (n == 0 and s == 0):\n if (w != 0 and e != 0) or (w == 0 and e == 0):\n print('Yes')\n else:\n print('No')\n else:\n print('No')", "main", "S = input().rstrip()", "S", "input().rstrip()", "().rstrip", "()", "input", "rstrip", "C = Counter(S)", "C", "Counter(S)", "Counter", "S", "n = C['N']", "n", "C['N']", "C", "'N'", "s = C['S']", "s", "C['S']", "C", "'S'", "w = C['W']", "w", "C['W']", "C", "'W'", "e = C['E']", "e", "C['E']", "C", "'E'", "if (n != 0 and s != 0) or (n == 0 and s == 0):\n if (w != 0 and e != 0) or (w == 0 and e == 0):\n print('Yes')\n else:\n print('No')\n else:\n print('No')", "(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", "if (w != 0 and e != 0) or (w == 0 and e == 0):\n print('Yes')\n else:\n print('No')\n ", "(w != 0 and e != 0) or (w == 0 and e == 0)", "w != 0 and e != 0", "w != 0", "w", "0", "e != 0", "e", "0", "w == 0 and e == 0", "w == 0", "w", "0", "e == 0", "e", "0", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "print('No')", "print", "'No'", "if __name__ == '__main__':\n main()", "__name__ == '__main__'", "__name__", "'__main__'", "main()", "main", "def main():\n S = input().rstrip()\n C = Counter(S)\n n = C['N']\n s = C['S']\n w = C['W']\n e = C['E']\n if (n != 0 and s != 0) or (n == 0 and s == 0):\n if (w != 0 and e != 0) or (w == 0 and e == 0):\n print('Yes')\n else:\n print('No')\n else:\n print('No')", "def main():\n S = input().rstrip()\n C = Counter(S)\n n = C['N']\n s = C['S']\n w = C['W']\n e = C['E']\n if (n != 0 and s != 0) or (n == 0 and s == 0):\n if (w != 0 and e != 0) or (w == 0 and e == 0):\n print('Yes')\n else:\n print('No')\n else:\n print('No')", "main", "input = sys.stdin.readline", "sys.stdin.readline", "input" ]
import sys input = sys.stdin.readline from collections import Counter def main(): S = input().rstrip() C = Counter(S) n = C['N'] s = C['S'] w = C['W'] e = C['E'] if (n != 0 and s != 0) or (n == 0 and s == 0): if (w != 0 and e != 0) or (w == 0 and e == 0): print('Yes') else: print('No') else: print('No') if __name__ == '__main__': main()
[ 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, 40, 2, 13, 13, 40, 2, 13, 13, 4, 13, 17, 4, 13, 17, 10, 2, 13, 10, 2, 13, 10, 4, 13, 10, 2, 13, 10, 2, 13 ]
[ [ 48, 2 ], [ 54, 6 ], [ 49, 9 ], [ 42, 11 ], [ 49, 14 ], [ 45, 16 ], [ 49, 19 ], [ 51, 21 ], [ 49, 24 ], [ 55, 29 ], [ 43, 30 ], [ 46, 33 ], [ 52, 34 ], [ 42, 43 ], [ 45, 46 ], [ 48, 49 ], [ 51, 52 ], [ 54, 55 ] ]
[ "S=input()\nn=('N' in S)\ns=('S' in S)\nw=('W' in S)\ne=('E' in S)\nif not n^s and not w^e:\n print('Yes')\nelse:\n print('No')", "S=input()", "S", "input()", "input", "n=('N' in S)", "n", "'N' in S", "'N'", "S", "s=('S' in S)", "s", "'S' in S", "'S'", "S", "w=('W' in S)", "w", "'W' in S", "'W'", "S", "e=('E' in S)", "e", "'E' in S", "'E'", "S", "if not n^s and not w^e:\n print('Yes')\nelse:\n print('No')", "not n^s and not w^e", "not n^s", "n^s", "n", "s", "not w^e", "w^e", "w", "e", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "s=('S' in S)", "'S' in S", "s", "w=('W' in S)", "'W' in S", "w", "S=input()", "input()", "S", "e=('E' in S)", "'E' in S", "e", "n=('N' in S)", "'N' in S", "n" ]
S=input() n=('N' in S) s=('S' in S) w=('W' in S) e=('E' in S) if not n^s and not w^e: print('Yes') else: print('No')
[ 7, 15, 15, 15, 15, 13, 15, 13, 15, 13, 15, 13, 15, 13, 4, 18, 13, 13, 17, 0, 13, 2, 2, 17, 17, 17, 15, 0, 13, 18, 13, 13, 12, 13, 29, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 12, 13, 29, 4, 13, 4, 13, 13, 4, 18, 4, 13, 13, 12, 13, 29, 4, 13, 4, 13, 0, 13, 4, 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, 2, 13, 10, 12, 13, 10, 12, 13, 10, 18, 13, 10, 12, 13 ]
[ [ 120, 20 ], [ 129, 28 ], [ 130, 43 ], [ 130, 56 ], [ 130, 64 ], [ 117, 66 ], [ 118, 73 ], [ 118, 76 ], [ 118, 84 ], [ 118, 87 ], [ 118, 95 ], [ 118, 98 ], [ 118, 106 ], [ 118, 109 ], [ 117, 118 ], [ 120, 121 ], [ 129, 130 ] ]
[ "#from statistics import median\n#import collections\n#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]\nfrom fractions import gcd\nfrom itertools import combinations,permutations,accumulate, product # (string,3) 3回\n#from collections import deque\nfrom collections import deque,defaultdict,Counter\nimport decimal\nimport re\nimport math\nimport bisect\n#\n#\n#\n# pythonで無理なときは、pypyでやると正解するかも!!\n#\n#\n# my_round_int = lambda x:np.round((x*2 + 1)//2)\n# 四捨五入g\n#\n# インデックス系\n# int min_y = max(0, i - 2), max_y = min(h - 1, i + 2);\n# int min_x = max(0, j - 2), max_x = min(w - 1, j + 2);\n#\n#\nimport sys\nsys.setrecursionlimit(10000000)\nmod = 10**9 + 7\n#mod = 9982443453\n#mod = 998244353\nfrom sys import stdin\nreadline = stdin.readline\ndef readInts():\n return list(map(int,readline().split()))\ndef readTuples():\n return tuple(map(int,readline().split()))\ndef I():\n return int(readline())\nS = input()\nif 'N' in S and 'S' not in S:\n print('No')\nelif 'S' in S and 'N' not in S:\n print('No')\nelif 'W' in S and 'E' not in S:\n print('No')\nelif 'E' in S and 'W' not in S:\n print('No')\nelse:\n print('Yes')", "from fractions import gcd", "from itertools import combinations,permutations,accumulate, product", "from collections import deque,defaultdict,Counter", "import decimal", "decimal", "import re", "re", "import math", "math", "import bisect", "bisect", "import sys", "sys", "sys.setrecursionlimit(10000000)", "sys.setrecursionlimit", "sys", "setrecursionlimit", "10000000", "mod = 10**9 + 7", "mod", "10**9 + 7", "10**9", "10", "9", "7", "from sys import stdin", "readline = stdin.readline", "readline", "stdin.readline", "stdin", "readline", "def readInts():\n return list(map(int,readline().split()))", "readInts", "return list(map(int,readline().split()))", "list(map(int,readline().split()))", "list", "map(int,readline().split())", "map", "int", "readline().split()", "().split", "()", "readline", "split", "def readTuples():\n return tuple(map(int,readline().split()))", "readTuples", "return tuple(map(int,readline().split()))", "tuple(map(int,readline().split()))", "tuple", "map(int,readline().split())", "map", "int", "readline().split()", "().split", "()", "readline", "split", "def I():\n return int(readline())", "I", "return int(readline())", "int(readline())", "int", "readline()", "readline", "S = input()", "S", "input()", "input", "if 'N' in S and 'S' not in S:\n print('No')\nelif 'S' in S and 'N' not in S:\n print('No')\nelif 'W' in S and 'E' not in S:\n print('No')\nelif 'E' in S and 'W' not in S:\n print('No')\nelse:\n print('Yes')", "'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'", "elif 'W' in S and 'E' not in S:\n print('No')", "'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'", "print('Yes')", "print", "'Yes'", "S = input()", "input()", "S", "mod = 10**9 + 7", "10**9 + 7", "mod", "def readInts():\n return list(map(int,readline().split()))", "def readInts():\n return list(map(int,readline().split()))", "readInts", "def I():\n return int(readline())", "def I():\n return int(readline())", "I", "readline = stdin.readline", "stdin.readline", "readline", "def readTuples():\n return tuple(map(int,readline().split()))", "def readTuples():\n return tuple(map(int,readline().split()))", "readTuples" ]
#from statistics import median #import collections #aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0] from fractions import gcd from itertools import combinations,permutations,accumulate, product # (string,3) 3回 #from collections import deque from collections import deque,defaultdict,Counter import decimal import re import math import bisect # # # # pythonで無理なときは、pypyでやると正解するかも!! # # # my_round_int = lambda x:np.round((x*2 + 1)//2) # 四捨五入g # # インデックス系 # int min_y = max(0, i - 2), max_y = min(h - 1, i + 2); # int min_x = max(0, j - 2), max_x = min(w - 1, j + 2); # # import sys sys.setrecursionlimit(10000000) mod = 10**9 + 7 #mod = 9982443453 #mod = 998244353 from sys import stdin readline = stdin.readline def readInts(): return list(map(int,readline().split())) def readTuples(): return tuple(map(int,readline().split())) def I(): return int(readline()) S = input() if 'N' in S and 'S' not in S: print('No') elif 'S' in S and 'N' not in S: print('No') elif 'W' in S and 'E' not in S: print('No') elif 'E' in S and 'W' not in S: print('No') else: print('Yes')
[ 7, 15, 13, 0, 13, 4, 13, 14, 2, 2, 2, 17, 13, 40, 17, 13, 2, 40, 17, 13, 2, 17, 13, 4, 13, 17, 4, 18, 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, 4, 13, 17, 10, 4, 13 ]
[ [ 57, 4 ], [ 58, 12 ], [ 58, 15 ], [ 58, 19 ], [ 58, 22 ], [ 58, 35 ], [ 58, 38 ], [ 58, 42 ], [ 58, 45 ], [ 57, 58 ] ]
[ "import sys\nD = input()\n\nif ('N' in D and 'S' not in D) or ('N' not in D and 'S' in D):\n print('No')\n sys.exit()\n\nif ('W' in D and 'E' not in D) or ('W' not in D and 'E' in D):\n print('No')\n sys.exit()\n\nprint('Yes')", "import sys", "sys", "D = input()", "D", "input()", "input", "if ('N' in D and 'S' not in D) or ('N' not in D and 'S' in D):\n print('No')\n sys.exit()", "('N' in D and 'S' not in D) or ('N' not in D and 'S' in D)", "'N' in D and 'S' not in D", "'N' in D", "'N'", "D", "'S' not in D", "'S'", "D", "'N' not in D and 'S' in D", "'N' not in D", "'N'", "D", "'S' in D", "'S'", "D", "print('No')", "print", "'No'", "sys.exit()", "sys.exit", "sys", "exit", "if ('W' in D and 'E' not in D) or ('W' not in D and 'E' in D):\n print('No')\n sys.exit()", "('W' in D and 'E' not in D) or ('W' not in D and 'E' in D)", "'W' in D and 'E' not in D", "'W' in D", "'W'", "D", "'E' not in D", "'E'", "D", "'W' not in D and 'E' in D", "'W' not in D", "'W'", "D", "'E' in D", "'E'", "D", "print('No')", "print", "'No'", "sys.exit()", "sys.exit", "sys", "exit", "print('Yes')", "print", "'Yes'", "D = input()", "input()", "D" ]
import sys D = input() if ('N' in D and 'S' not in D) or ('N' not in D and 'S' in D): print('No') sys.exit() if ('W' in D and 'E' not in D) or ('W' not in D and 'E' in D): print('No') sys.exit() print('Yes')
[ 7, 0, 13, 4, 18, 17, 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 ]
[ [ 40, 2 ], [ 41, 18 ], [ 41, 24 ], [ 41, 29 ], [ 41, 34 ], [ 40, 41 ] ]
[ "S=\"\".join(set(input()))\nprint(\"Yes\" if len(S)==4 or (len(S)==2 and S.count(\"N\")==S.count(\"S\")) else \"No\")", "S=\"\".join(set(input()))", "S", "\"\".join(set(input()))", "\"\".join", "\"\"", "join", "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=\"\".join(set(input()))", "\"\".join(set(input()))", "S" ]
S="".join(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, 0, 13, 39, 28, 13, 13, 4, 18, 13, 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, 39, 13, 10, 4, 13 ]
[ [ 58, 2 ], [ 55, 6 ], [ 10, 9 ], [ 59, 9 ], [ 56, 13 ], [ 9, 15 ], [ 56, 23 ], [ 56, 26 ], [ 56, 30 ], [ 56, 33 ], [ 56, 37 ], [ 56, 40 ], [ 56, 44 ], [ 56, 47 ], [ 55, 56 ], [ 58, 59 ] ]
[ "string=input()\nn=[]\nfor letter in string:\n n.append(letter)\nif ('N' in n and 'S' not in n) or ('S' in n and 'N' not in n) or ('E' in n and 'W' not in n)or ('W' in n and 'E' not in n):\n print('No')\nelse:\n print('Yes')", "string=input()", "string", "input()", "input", "n=[]", "n", "[]", "for letter in string:\n n.append(letter)", "letter", "string", "n.append(letter)", "n.append", "n", "append", "letter", "if ('N' in n and 'S' not in n) or ('S' in n and 'N' not in n) or ('E' in n and 'W' not in n)or ('W' in n and 'E' not in n):\n print('No')\nelse:\n print('Yes')", "('N' in n and 'S' not in n) or ('S' in n and 'N' not in n) or ('E' in n and 'W' not in n)or ('W' in n and 'E' not in n)", "('N' in n and 'S' not in n) or ('S' in n and 'N' not in n) or ('E' in n and 'W' not in n)", "('N' in n and 'S' not in n) or ('S' in n and 'N' not in n)", "'N' in n and 'S' not in n", "'N' in n", "'N'", "n", "'S' not in n", "'S'", "n", "'S' in n and 'N' not in n", "'S' in n", "'S'", "n", "'N' not in n", "'N'", "n", "'E' in n and 'W' not in n", "'E' in n", "'E'", "n", "'W' not in n", "'W'", "n", "'W' in n and 'E' not in n", "'W' in n", "'W'", "n", "'E' not in n", "'E'", "n", "print('No')", "print", "'No'", "print('Yes')", "print", "'Yes'", "n=[]", "[]", "n", "string=input()", "input()", "string" ]
string=input() n=[] for letter in string: n.append(letter) if ('N' in n and 'S' not in n) or ('S' in n and 'N' not in n) or ('E' in n and 'W' not in n)or ('W' in n and 'E' not in n): 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, 13, 17, 40, 13, 17, 2, 2, 13, 17, 40, 13, 17, 4, 13, 17, 14, 2, 2, 2, 13, 17, 40, 13, 17, 2, 2, 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 ]
[ [ 81, 2 ], [ 78, 6 ], [ 82, 9 ], [ 75, 13 ], [ 82, 16 ], [ 84, 20 ], [ 82, 23 ], [ 87, 27 ], [ 82, 30 ], [ 85, 37 ], [ 79, 40 ], [ 79, 44 ], [ 85, 47 ], [ 76, 56 ], [ 88, 59 ], [ 88, 63 ], [ 76, 66 ], [ 75, 76 ], [ 78, 79 ], [ 81, 82 ], [ 84, 85 ], [ 87, 88 ] ]
[ "s = input()\nS = s.count(\"S\")\nE = s.count(\"E\")\nN = s.count(\"N\")\nW = s.count(\"W\")\nif (N==0 and S != 0) or (S==0 and N != 0):\n print(\"No\")\nelif (E==0 and W != 0) or (W==0 and E != 0):\n print(\"No\")\nelse:\n print(\"Yes\")", "s = input()", "s", "input()", "input", "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\"", "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\"", "if (N==0 and S != 0) or (S==0 and N != 0):\n print(\"No\")\nelif (E==0 and W != 0) or (W==0 and E != 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 (E==0 and W != 0) or (W==0 and E != 0):\n print(\"No\")", "(E==0 and W != 0) or (W==0 and E != 0)", "E==0 and W != 0", "E==0", "E", "0", "W != 0", "W", "0", "W==0 and E != 0", "W==0", "W", "0", "E != 0", "E", "0", "print(\"No\")", "print", "\"No\"", "print(\"Yes\")", "print", "\"Yes\"", "E = s.count(\"E\")", "s.count(\"E\")", "E", "S = s.count(\"S\")", "s.count(\"S\")", "S", "s = input()", "input()", "s", "N = s.count(\"N\")", "s.count(\"N\")", "N", "W = s.count(\"W\")", "s.count(\"W\")", "W" ]
s = input() S = s.count("S") E = s.count("E") N = s.count("N") W = s.count("W") if (N==0 and S != 0) or (S==0 and N != 0): print("No") elif (E==0 and W != 0) or (W==0 and E != 0): print("No") else: print("Yes")
[ 7, 0, 13, 4, 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 ]
[ [ 53, 2 ], [ 54, 9 ], [ 54, 12 ], [ 54, 20 ], [ 54, 23 ], [ 54, 31 ], [ 54, 34 ], [ 54, 42 ], [ 54, 45 ], [ 53, 54 ] ]
[ "S = input()\nif \"S\" in S and \"N\" not in S:\n print(\"No\")\nelif \"N\" in S and \"S\" not in S:\n print(\"No\")\nelif \"E\" in S and \"W\" not in S:\n print(\"No\")\nelif \"W\" in S and \"E\" not in S:\n print(\"No\")\nelse:\n print(\"Yes\")", "S = input()", "S", "input()", "input", "if \"S\" in S and \"N\" not in S:\n print(\"No\")\nelif \"N\" in S and \"S\" not in S:\n print(\"No\")\nelif \"E\" in S and \"W\" not in S:\n print(\"No\")\nelif \"W\" in S and \"E\" not in S:\n print(\"No\")\nelse:\n print(\"Yes\")", "\"S\" in S and \"N\" not in S", "\"S\" in S", "\"S\"", "S", "\"N\" not in S", "\"N\"", "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 \"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 \"W\" in S and \"E\" not in S:\n print(\"No\")", "\"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" in S and "N" not in S: print("No") elif "N" in S and "S" not in S: print("No") elif "E" in S and "W" not in S: print("No") elif "W" in S and "E" not in S: print("No") else: 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, 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, 13, 17, 2, 13, 17, 2, 2, 13, 17, 2, 13, 17, 0, 13, 17, 0, 13, 17, 14, 2, 2, 2, 13, 17, 2, 13, 17, 2, 2, 13, 17, 2, 13, 17, 0, 13, 17, 0, 13, 17, 14, 2, 13, 13, 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, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 142, 2 ], [ 127, 6 ], [ 118, 9 ], [ 124, 12 ], [ 130, 15 ], [ 19, 18 ], [ 143, 23 ], [ 143, 27 ], [ 18, 28 ], [ 145, 31 ], [ 143, 36 ], [ 18, 37 ], [ 139, 40 ], [ 143, 45 ], [ 18, 46 ], [ 121, 49 ], [ 143, 54 ], [ 18, 55 ], [ 133, 58 ], [ 146, 64 ], [ 128, 64 ], [ 140, 67 ], [ 119, 67 ], [ 146, 71 ], [ 128, 71 ], [ 140, 74 ], [ 119, 74 ], [ 148, 77 ], [ 115, 80 ], [ 134, 86 ], [ 125, 86 ], [ 122, 89 ], [ 131, 89 ], [ 134, 93 ], [ 125, 93 ], [ 122, 96 ], [ 131, 96 ], [ 151, 99 ], [ 136, 102 ], [ 116, 106 ], [ 149, 106 ], [ 137, 107 ], [ 152, 107 ], [ 115, 116 ], [ 118, 119 ], [ 121, 122 ], [ 124, 125 ], [ 127, 128 ], [ 130, 131 ], [ 133, 134 ], [ 136, 137 ], [ 139, 140 ], [ 142, 143 ], [ 145, 146 ], [ 148, 149 ], [ 151, 152 ] ]
[ "s = input()\nn_cnt = 0\ns_cnt = 0\ne_cnt = 0\nw_cnt = 0\nfor i in range(len(s)):\n if s[i] == 'N':\n n_cnt += 1\n if s[i] == 'S':\n s_cnt += 1\n if s[i] == 'W':\n w_cnt += 1\n if s[i] == 'E':\n e_cnt += 1\nif (n_cnt > 0 and s_cnt > 0) or (n_cnt == 0 and s_cnt == 0):\n length = True\nelse:\n length = False\nif (e_cnt > 0 and w_cnt > 0) or (e_cnt == 0 and w_cnt == 0):\n width = True\nelse:\n width = False\n \nif length and width:\n print('Yes')\nelse:\n print('No')", "s = input()", "s", "input()", "input", "n_cnt = 0", "n_cnt", "0", "s_cnt = 0", "s_cnt", "0", "e_cnt = 0", "e_cnt", "0", "w_cnt = 0", "w_cnt", "0", "for i in range(len(s)):\n if s[i] == 'N':\n n_cnt += 1\n if s[i] == 'S':\n s_cnt += 1\n if s[i] == 'W':\n w_cnt += 1\n if s[i] == 'E':\n e_cnt += 1", "i", "range(len(s))", "range", "len(s)", "len", "s", "if s[i] == 'N':\n n_cnt += 1\n ", "s[i] == 'N'", "s[i]", "s", "i", "'N'", "n_cnt += 1", "n_cnt", "1", "if s[i] == 'S':\n s_cnt += 1\n ", "s[i] == 'S'", "s[i]", "s", "i", "'S'", "s_cnt += 1", "s_cnt", "1", "if s[i] == 'W':\n w_cnt += 1\n ", "s[i] == 'W'", "s[i]", "s", "i", "'W'", "w_cnt += 1", "w_cnt", "1", "if s[i] == 'E':\n e_cnt += 1", "s[i] == 'E'", "s[i]", "s", "i", "'E'", "e_cnt += 1", "e_cnt", "1", "if (n_cnt > 0 and s_cnt > 0) or (n_cnt == 0 and s_cnt == 0):\n length = True\nelse:\n length = False", "(n_cnt > 0 and s_cnt > 0) or (n_cnt == 0 and s_cnt == 0)", "n_cnt > 0 and s_cnt > 0", "n_cnt > 0", "n_cnt", "0", "s_cnt > 0", "s_cnt", "0", "n_cnt == 0 and s_cnt == 0", "n_cnt == 0", "n_cnt", "0", "s_cnt == 0", "s_cnt", "0", "length = True", "length", "True", "length = False", "length", "False", "if (e_cnt > 0 and w_cnt > 0) or (e_cnt == 0 and w_cnt == 0):\n width = True\nelse:\n width = False\n ", "(e_cnt > 0 and w_cnt > 0) or (e_cnt == 0 and w_cnt == 0)", "e_cnt > 0 and w_cnt > 0", "e_cnt > 0", "e_cnt", "0", "w_cnt > 0", "w_cnt", "0", "e_cnt == 0 and w_cnt == 0", "e_cnt == 0", "e_cnt", "0", "w_cnt == 0", "w_cnt", "0", "width = True", "width", "True", "width = False", "width", "False", "if length and width:\n print('Yes')\nelse:\n print('No')", "length and width", "length", "width", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "length = False", "False", "length", "s_cnt = 0", "0", "s_cnt", "w_cnt += 1", "1", "w_cnt", "e_cnt = 0", "0", "e_cnt", "n_cnt = 0", "0", "n_cnt", "w_cnt = 0", "0", "w_cnt", "e_cnt += 1", "1", "e_cnt", "width = False", "False", "width", "s_cnt += 1", "1", "s_cnt", "s = input()", "input()", "s", "n_cnt += 1", "1", "n_cnt", "length = True", "True", "length", "width = True", "True", "width" ]
s = input() n_cnt = 0 s_cnt = 0 e_cnt = 0 w_cnt = 0 for i in range(len(s)): if s[i] == 'N': n_cnt += 1 if s[i] == 'S': s_cnt += 1 if s[i] == 'W': w_cnt += 1 if s[i] == 'E': e_cnt += 1 if (n_cnt > 0 and s_cnt > 0) or (n_cnt == 0 and s_cnt == 0): length = True else: length = False if (e_cnt > 0 and w_cnt > 0) or (e_cnt == 0 and w_cnt == 0): width = True else: width = False if length and width: print('Yes') else: print('No')
[ 7, 15, 13, 12, 13, 0, 13, 4, 18, 4, 13, 13, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 14, 2, 13, 17, 14, 2, 13, 17, 0, 13, 17, 14, 2, 13, 17, 0, 13, 13, 14, 2, 13, 17, 14, 2, 13, 17, 0, 13, 17, 14, 2, 13, 17, 0, 13, 13, 14, 2, 13, 17, 14, 2, 13, 17, 0, 13, 17, 14, 2, 13, 17, 0, 13, 13, 14, 2, 13, 17, 14, 2, 13, 17, 0, 13, 17, 14, 2, 13, 17, 0, 13, 13, 29, 40, 2, 13, 13, 29, 17, 23, 13, 12, 13, 0, 13, 4, 13, 18, 13, 13, 4, 13, 8, 13, 17, 17, 14, 2, 13, 17, 4, 13, 10, 12, 13, 10, 12, 13 ]
[ [ 7, 6 ], [ 102, 11 ], [ 15, 14 ], [ 18, 17 ], [ 21, 20 ], [ 6, 20 ], [ 20, 24 ], [ 14, 28 ], [ 56, 28 ], [ 49, 28 ], [ 38, 28 ], [ 31, 28 ], [ 32, 31 ], [ 14, 35 ], [ 56, 35 ], [ 49, 35 ], [ 38, 35 ], [ 31, 35 ], [ 39, 38 ], [ 20, 39 ], [ 20, 42 ], [ 14, 46 ], [ 56, 46 ], [ 49, 46 ], [ 38, 46 ], [ 31, 46 ], [ 50, 49 ], [ 14, 53 ], [ 56, 53 ], [ 49, 53 ], [ 38, 53 ], [ 31, 53 ], [ 57, 56 ], [ 20, 57 ], [ 20, 60 ], [ 17, 64 ], [ 92, 64 ], [ 85, 64 ], [ 74, 64 ], [ 67, 64 ], [ 68, 67 ], [ 17, 71 ], [ 92, 71 ], [ 85, 71 ], [ 74, 71 ], [ 67, 71 ], [ 75, 74 ], [ 20, 75 ], [ 20, 78 ], [ 17, 82 ], [ 92, 82 ], [ 85, 82 ], [ 74, 82 ], [ 67, 82 ], [ 86, 85 ], [ 17, 89 ], [ 92, 89 ], [ 85, 89 ], [ 74, 89 ], [ 67, 89 ], [ 93, 92 ], [ 20, 93 ], [ 56, 97 ], [ 49, 97 ], [ 38, 97 ], [ 31, 97 ], [ 14, 97 ], [ 92, 98 ], [ 85, 98 ], [ 74, 98 ], [ 67, 98 ], [ 17, 98 ], [ 102, 102 ], [ 107, 106 ], [ 126, 108 ], [ 106, 115 ], [ 129, 123 ] ]
[ "import sys\n\n\ndef resolve(in_):\n S = next(in_).strip()\n \n H = None\n W = None\n\n for c in S:\n if c == 'N':\n if H == 'S':\n H = False\n elif H is None:\n H = c\n elif c == 'S':\n if H == 'N':\n H = False\n elif H is None:\n H = c\n elif c == 'W':\n if W == 'E':\n W = False\n elif W is None:\n W = c\n elif c == 'E':\n if W == 'W':\n W = False\n elif W is None:\n W = c\n \n return not (H or W)\n \n return True\n\n\ndef main():\n answer = resolve(sys.stdin)\n print('Yes' if answer else 'No')\n\n\nif __name__ == '__main__':\n main()", "import sys", "sys", "def resolve(in_):\n S = next(in_).strip()\n \n H = None\n W = None\n\n for c in S:\n if c == 'N':\n if H == 'S':\n H = False\n elif H is None:\n H = c\n elif c == 'S':\n if H == 'N':\n H = False\n elif H is None:\n H = c\n elif c == 'W':\n if W == 'E':\n W = False\n elif W is None:\n W = c\n elif c == 'E':\n if W == 'W':\n W = False\n elif W is None:\n W = c\n \n return not (H or W)\n \n return True", "resolve", "S = next(in_).strip()", "S", "next(in_).strip()", "(in_).strip", "(in_)", "next", "in_", "strip", "H = None", "H", "None", "W = None", "W", "None", "for c in S:\n if c == 'N':\n if H == 'S':\n H = False\n elif H is None:\n H = c\n elif c == 'S':\n if H == 'N':\n H = False\n elif H is None:\n H = c\n elif c == 'W':\n if W == 'E':\n W = False\n elif W is None:\n W = c\n elif c == 'E':\n if W == 'W':\n W = False\n elif W is None:\n W = c\n \n ", "c", "S", "if c == 'N':\n if H == 'S':\n H = False\n elif H is None:\n H = c\n elif c == 'S':\n if H == 'N':\n H = False\n elif H is None:\n H = c\n elif c == 'W':\n if W == 'E':\n W = False\n elif W is None:\n W = c\n elif c == 'E':\n if W == 'W':\n W = False\n elif W is None:\n W = c\n \n ", "c == 'N'", "c", "'N'", "if H == 'S':\n H = False\n elif H is None:\n H = c\n ", "H == 'S'", "H", "'S'", "H = False", "H", "False", "elif H is None:\n H = c\n ", "H is None", "H", "None", "H = c", "H", "c", "elif c == 'S':\n if H == 'N':\n H = False\n elif H is None:\n H = c\n ", "c == 'S'", "c", "'S'", "if H == 'N':\n H = False\n elif H is None:\n H = c\n ", "H == 'N'", "H", "'N'", "H = False", "H", "False", "elif H is None:\n H = c\n ", "H is None", "H", "None", "H = c", "H", "c", "elif c == 'W':\n if W == 'E':\n W = False\n elif W is None:\n W = c\n ", "c == 'W'", "c", "'W'", "if W == 'E':\n W = False\n elif W is None:\n W = c\n ", "W == 'E'", "W", "'E'", "W = False", "W", "False", "elif W is None:\n W = c\n ", "W is None", "W", "None", "W = c", "W", "c", "elif c == 'E':\n if W == 'W':\n W = False\n elif W is None:\n W = c\n \n ", "c == 'E'", "c", "'E'", "if W == 'W':\n W = False\n elif W is None:\n W = c\n \n ", "W == 'W'", "W", "'W'", "W = False", "W", "False", "elif W is None:\n W = c\n \n ", "W is None", "W", "None", "W = c", "W", "c", "return not (H or W)", "not (H or W)", "H or W", "H", "W", "return True", "True", "in_", "in_", "def main():\n answer = resolve(sys.stdin)\n print('Yes' if answer else 'No')", "main", "answer = resolve(sys.stdin)", "answer", "resolve(sys.stdin)", "resolve", "sys.stdin", "sys", "stdin", "print('Yes' if answer else 'No')", "print", "'Yes' if answer else 'No'", "answer", "'Yes'", "'No'", "if __name__ == '__main__':\n main()", "__name__ == '__main__'", "__name__", "'__main__'", "main()", "main", "def resolve(in_):\n S = next(in_).strip()\n \n H = None\n W = None\n\n for c in S:\n if c == 'N':\n if H == 'S':\n H = False\n elif H is None:\n H = c\n elif c == 'S':\n if H == 'N':\n H = False\n elif H is None:\n H = c\n elif c == 'W':\n if W == 'E':\n W = False\n elif W is None:\n W = c\n elif c == 'E':\n if W == 'W':\n W = False\n elif W is None:\n W = c\n \n return not (H or W)\n \n return True", "def resolve(in_):\n S = next(in_).strip()\n \n H = None\n W = None\n\n for c in S:\n if c == 'N':\n if H == 'S':\n H = False\n elif H is None:\n H = c\n elif c == 'S':\n if H == 'N':\n H = False\n elif H is None:\n H = c\n elif c == 'W':\n if W == 'E':\n W = False\n elif W is None:\n W = c\n elif c == 'E':\n if W == 'W':\n W = False\n elif W is None:\n W = c\n \n return not (H or W)\n \n return True", "resolve", "def main():\n answer = resolve(sys.stdin)\n print('Yes' if answer else 'No')", "def main():\n answer = resolve(sys.stdin)\n print('Yes' if answer else 'No')", "main" ]
import sys def resolve(in_): S = next(in_).strip() H = None W = None for c in S: if c == 'N': if H == 'S': H = False elif H is None: H = c elif c == 'S': if H == 'N': H = False elif H is None: H = c elif c == 'W': if W == 'E': W = False elif W is None: W = c elif c == 'E': if W == 'W': W = False elif W is None: W = c return not (H or W) return True def main(): answer = resolve(sys.stdin) print('Yes' if answer else 'No') if __name__ == '__main__': main()
[ 7, 15, 13, 15, 0, 13, 4, 18, 4, 18, 18, 13, 13, 13, 13, 0, 13, 17, 0, 13, 17, 28, 13, 13, 14, 2, 13, 13, 9, 0, 13, 13, 0, 13, 13, 0, 13, 4, 13, 13, 0, 13, 21, 22, 17, 17, 22, 17, 17, 22, 17, 17, 22, 17, 17, 28, 13, 13, 4, 18, 13, 13, 0, 18, 13, 13, 13, 0, 13, 17, 14, 2, 2, 2, 17, 18, 13, 17, 2, 17, 18, 13, 17, 2, 4, 13, 2, 18, 13, 17, 18, 13, 17, 17, 0, 13, 17, 14, 2, 18, 13, 17, 18, 13, 17, 0, 13, 17, 0, 13, 17, 14, 2, 2, 2, 17, 18, 13, 17, 2, 17, 18, 13, 17, 2, 4, 13, 2, 18, 13, 17, 18, 13, 17, 17, 0, 13, 17, 14, 2, 18, 13, 17, 18, 13, 17, 0, 13, 17, 14, 2, 13, 13, 4, 13, 17, 4, 13, 17, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 13, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 13, 13, 10, 4, 13, 10, 21, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13 ]
[ [ 193, 5 ], [ 196, 16 ], [ 166, 19 ], [ 23, 22 ], [ 194, 22 ], [ 22, 26 ], [ 167, 27 ], [ 170, 27 ], [ 181, 30 ], [ 22, 31 ], [ 169, 33 ], [ 22, 34 ], [ 184, 36 ], [ 182, 39 ], [ 197, 39 ], [ 187, 41 ], [ 185, 60 ], [ 66, 63 ], [ 188, 64 ], [ 172, 68 ], [ 188, 76 ], [ 188, 81 ], [ 188, 88 ], [ 188, 91 ], [ 163, 95 ], [ 188, 100 ], [ 188, 103 ], [ 175, 106 ], [ 160, 109 ], [ 188, 117 ], [ 188, 122 ], [ 188, 129 ], [ 188, 132 ], [ 190, 136 ], [ 188, 141 ], [ 188, 144 ], [ 178, 147 ], [ 176, 151 ], [ 164, 151 ], [ 173, 151 ], [ 179, 152 ], [ 191, 152 ], [ 161, 152 ], [ 160, 161 ], [ 163, 164 ], [ 166, 167 ], [ 22, 169 ], [ 169, 170 ], [ 172, 173 ], [ 175, 176 ], [ 178, 179 ], [ 22, 181 ], [ 181, 182 ], [ 184, 185 ], [ 187, 188 ], [ 190, 191 ], [ 193, 194 ], [ 196, 197 ] ]
[ "import sys\nfrom collections import Counter\n\ntmp = sys.stdin.readline().strip()\ndirections = \"\"\npre = \"\"\nfor c in tmp:\n if c == pre:\n continue\n directions += c\n pre = c\n \ncounter = Counter(directions)\n# print(counter)\n\nd = {\"S\": 0, \"E\": 0, \"N\": 0, \"W\": 0}\nfor t, count in counter.items():\n d[t] = count\n\nsn = False\nif 0 < d[\"S\"] and 0 < d[\"N\"] and abs(d[\"S\"] - d[\"N\"]) < 2:\n sn = True\nif d[\"S\"] == d[\"N\"]:\n sn = True\n\new = False\nif 0 < d[\"E\"] and 0 < d[\"W\"] and abs(d[\"E\"] - d[\"W\"]) < 2:\n ew = True\nif d[\"E\"] == d[\"W\"]:\n ew = True\n\nif sn and ew:\n print(\"Yes\")\nelse:\n print(\"No\")", "import sys", "sys", "from collections import Counter", "tmp = sys.stdin.readline().strip()", "tmp", "sys.stdin.readline().strip()", "sys.stdin.readline().strip", "sys.stdin.readline()", "sys.stdin.readline", "sys.stdin", "sys", "stdin", "readline", "strip", "directions = \"\"", "directions", "\"\"", "pre = \"\"", "pre", "\"\"", "for c in tmp:\n if c == pre:\n continue\n directions += c\n pre = c\n ", "c", "tmp", "if c == pre:\n continue\n ", "c == pre", "c", "pre", "continue", "directions += c", "directions", "c", "pre = c", "pre", "c", "counter = Counter(directions)", "counter", "Counter(directions)", "Counter", "directions", "d = {\"S\": 0, \"E\": 0, \"N\": 0, \"W\": 0}", "d", "{\"S\": 0, \"E\": 0, \"N\": 0, \"W\": 0}", "\"S\"", "\"S\"", "0", "\"E\"", "\"E\"", "0", "\"N\"", "\"N\"", "0", "\"W\"", "\"W\"", "0", "for t, count in counter.items():\n d[t] = count", "t", "count", "counter.items()", "counter.items", "counter", "items", "d[t] = count", "d[t]", "d", "t", "count", "sn = False", "sn", "False", "if 0 < d[\"S\"] and 0 < d[\"N\"] and abs(d[\"S\"] - d[\"N\"]) < 2:\n sn = True", "0 < d[\"S\"] and 0 < d[\"N\"] and abs(d[\"S\"] - d[\"N\"]) < 2", "0 < d[\"S\"] and 0 < d[\"N\"]", "0 < d[\"S\"]", "0", "d[\"S\"]", "d", "\"S\"", "0 < d[\"N\"]", "0", "d[\"N\"]", "d", "\"N\"", "abs(d[\"S\"] - d[\"N\"]) < 2", "abs(d[\"S\"] - d[\"N\"])", "abs", "d[\"S\"] - d[\"N\"]", "d[\"S\"]", "d", "\"S\"", "d[\"N\"]", "d", "\"N\"", "2", "sn = True", "sn", "True", "if d[\"S\"] == d[\"N\"]:\n sn = True", "d[\"S\"] == d[\"N\"]", "d[\"S\"]", "d", "\"S\"", "d[\"N\"]", "d", "\"N\"", "sn = True", "sn", "True", "ew = False", "ew", "False", "if 0 < d[\"E\"] and 0 < d[\"W\"] and abs(d[\"E\"] - d[\"W\"]) < 2:\n ew = True", "0 < d[\"E\"] and 0 < d[\"W\"] and abs(d[\"E\"] - d[\"W\"]) < 2", "0 < d[\"E\"] and 0 < d[\"W\"]", "0 < d[\"E\"]", "0", "d[\"E\"]", "d", "\"E\"", "0 < d[\"W\"]", "0", "d[\"W\"]", "d", "\"W\"", "abs(d[\"E\"] - d[\"W\"]) < 2", "abs(d[\"E\"] - d[\"W\"])", "abs", "d[\"E\"] - d[\"W\"]", "d[\"E\"]", "d", "\"E\"", "d[\"W\"]", "d", "\"W\"", "2", "ew = True", "ew", "True", "if d[\"E\"] == d[\"W\"]:\n ew = True", "d[\"E\"] == d[\"W\"]", "d[\"E\"]", "d", "\"E\"", "d[\"W\"]", "d", "\"W\"", "ew = True", "ew", "True", "if sn and ew:\n print(\"Yes\")\nelse:\n print(\"No\")", "sn and ew", "sn", "ew", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "ew = False", "False", "ew", "sn = True", "True", "sn", "pre = \"\"", "\"\"", "pre", "pre = c", "c", "pre", "sn = False", "False", "sn", "sn = True", "True", "sn", "ew = True", "True", "ew", "directions += c", "c", "directions", "counter = Counter(directions)", "Counter(directions)", "counter", "d = {\"S\": 0, \"E\": 0, \"N\": 0, \"W\": 0}", "{\"S\": 0, \"E\": 0, \"N\": 0, \"W\": 0}", "d", "ew = True", "True", "ew", "tmp = sys.stdin.readline().strip()", "sys.stdin.readline().strip()", "tmp", "directions = \"\"", "\"\"", "directions" ]
import sys from collections import Counter tmp = sys.stdin.readline().strip() directions = "" pre = "" for c in tmp: if c == pre: continue directions += c pre = c counter = Counter(directions) # print(counter) d = {"S": 0, "E": 0, "N": 0, "W": 0} for t, count in counter.items(): d[t] = count sn = False if 0 < d["S"] and 0 < d["N"] and abs(d["S"] - d["N"]) < 2: sn = True if d["S"] == d["N"]: sn = True ew = False if 0 < d["E"] and 0 < d["W"] and abs(d["E"] - d["W"]) < 2: ew = True if d["E"] == d["W"]: ew = True if sn and ew: print("Yes") else: print("No")
[ 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, 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, 4, 13, 17, 10, 12, 13, 10, 12, 13, 10, 4, 13, 10, 2, 13, 10, 12, 13, 10, 4, 13, 10, 12, 13, 10, 12, 13, 10, 4, 13 ]
[ [ 26, 25 ], [ 100, 31 ], [ 35, 35 ], [ 120, 44 ], [ 105, 49 ], [ 111, 57 ], [ 97, 59 ], [ 102, 61 ], [ 67, 66 ], [ 112, 66 ], [ 72, 69 ], [ 103, 70 ], [ 66, 71 ], [ 103, 77 ], [ 103, 80 ], [ 103, 84 ], [ 103, 87 ], [ 102, 103 ], [ 105, 106 ], [ 111, 112 ], [ 120, 121 ] ]
[ "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\nx = defaultdict(int)\n\nfor s in S:\n\tx[s] = 1\n\nif x[\"N\"] == x[\"S\"] and x[\"W\"] ==x[\"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", "x = defaultdict(int)", "x", "defaultdict(int)", "defaultdict", "int", "for s in S:\n\tx[s] = 1", "s", "S", "x[s] = 1", "x[s]", "x", "s", "1", "if x[\"N\"] == x[\"S\"] and x[\"W\"] ==x[\"E\"]:\n\tprint(\"Yes\")\nelse:\n\tprint(\"No\")", "x[\"N\"] == x[\"S\"] and x[\"W\"] ==x[\"E\"]", "x[\"N\"] == x[\"S\"]", "x[\"N\"]", "x", "\"N\"", "x[\"S\"]", "x", "\"S\"", "x[\"W\"] ==x[\"E\"]", "x[\"W\"]", "x", "\"W\"", "x[\"E\"]", "x", "\"E\"", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "def input(): return sys.stdin.readline().strip()", "def input(): return sys.stdin.readline().strip()", "input", "def MAP(): return map(int, input().split())", "def MAP(): return map(int, input().split())", "MAP", "x = defaultdict(int)", "defaultdict(int)", "x", "mod = 10**9 + 7", "10**9 + 7", "mod", "def INT(): return int(input())", "def INT(): return int(input())", "INT", "S = input()", "input()", "S", "def ZIP(n): return zip(*(MAP() for _ in range(n)))", "def ZIP(n): return zip(*(MAP() for _ in range(n)))", "ZIP", "def LIST(): return list(map(int, input().split()))", "def LIST(): return list(map(int, input().split()))", "LIST", "INF = float('inf')", "float('inf')", "INF" ]
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() x = defaultdict(int) for s in S: x[s] = 1 if x["N"] == x["S"] and x["W"] ==x["E"]: 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, 40, 13, 17, 14, 2, 13, 17, 0, 13, 17, 14, 40, 13, 17, 14, 2, 13, 17, 0, 13, 17, 14, 40, 13, 17, 14, 2, 13, 17, 0, 13, 17, 14, 40, 13, 17, 14, 2, 13, 17, 0, 13, 17, 14, 2, 13, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13 ]
[ [ 117, 2 ], [ 102, 8 ], [ 114, 11 ], [ 118, 14 ], [ 99, 18 ], [ 118, 21 ], [ 93, 25 ], [ 118, 28 ], [ 111, 32 ], [ 118, 35 ], [ 115, 40 ], [ 100, 44 ], [ 105, 47 ], [ 100, 51 ], [ 115, 55 ], [ 96, 58 ], [ 112, 62 ], [ 94, 66 ], [ 120, 69 ], [ 94, 73 ], [ 112, 77 ], [ 108, 80 ], [ 109, 84 ], [ 121, 84 ], [ 97, 84 ], [ 106, 84 ], [ 103, 84 ], [ 93, 94 ], [ 96, 97 ], [ 99, 100 ], [ 102, 103 ], [ 105, 106 ], [ 108, 109 ], [ 111, 112 ], [ 114, 115 ], [ 117, 118 ], [ 120, 121 ] ]
[ "s = list(input())\nans = 1\ncE = s.count(\"E\")\ncW = s.count(\"W\")\ncS = s.count(\"S\")\ncN = s.count(\"N\")\nif cE >=1:\n if cW == 0:\n ans = 0\nif cW >=1:\n if cE == 0:\n ans = 0\nif cN >=1:\n if cS == 0:\n ans = 0\nif cS >=1:\n if cN == 0:\n ans = 0\nif ans == 1:\n print(\"Yes\")\nelse:\n print(\"No\")", "s = list(input())", "s", "list(input())", "list", "input()", "input", "ans = 1", "ans", "1", "cE = s.count(\"E\")", "cE", "s.count(\"E\")", "s.count", "s", "count", "\"E\"", "cW = s.count(\"W\")", "cW", "s.count(\"W\")", "s.count", "s", "count", "\"W\"", "cS = s.count(\"S\")", "cS", "s.count(\"S\")", "s.count", "s", "count", "\"S\"", "cN = s.count(\"N\")", "cN", "s.count(\"N\")", "s.count", "s", "count", "\"N\"", "if cE >=1:\n if cW == 0:\n ans = 0", "cE >=1", "cE", "1", "if cW == 0:\n ans = 0", "cW == 0", "cW", "0", "ans = 0", "ans", "0", "if cW >=1:\n if cE == 0:\n ans = 0", "cW >=1", "cW", "1", "if cE == 0:\n ans = 0", "cE == 0", "cE", "0", "ans = 0", "ans", "0", "if cN >=1:\n if cS == 0:\n ans = 0", "cN >=1", "cN", "1", "if cS == 0:\n ans = 0", "cS == 0", "cS", "0", "ans = 0", "ans", "0", "if cS >=1:\n if cN == 0:\n ans = 0", "cS >=1", "cS", "1", "if cN == 0:\n ans = 0", "cN == 0", "cN", "0", "ans = 0", "ans", "0", "if ans == 1:\n print(\"Yes\")\nelse:\n print(\"No\")", "ans == 1", "ans", "1", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "cS = s.count(\"S\")", "s.count(\"S\")", "cS", "ans = 0", "0", "ans", "cW = s.count(\"W\")", "s.count(\"W\")", "cW", "ans = 1", "1", "ans", "ans = 0", "0", "ans", "ans = 0", "0", "ans", "cN = s.count(\"N\")", "s.count(\"N\")", "cN", "cE = s.count(\"E\")", "s.count(\"E\")", "cE", "s = list(input())", "list(input())", "s", "ans = 0", "0", "ans" ]
s = list(input()) ans = 1 cE = s.count("E") cW = s.count("W") cS = s.count("S") cN = s.count("N") if cE >=1: if cW == 0: ans = 0 if cW >=1: if cE == 0: ans = 0 if cN >=1: if cS == 0: ans = 0 if cS >=1: if cN == 0: ans = 0 if ans == 1: print("Yes") else: print("No")
[ 7, 0, 13, 4, 13, 4, 13, 4, 13, 14, 4, 13, 2, 13, 4, 13, 4, 13, 13, 4, 13, 17, 4, 13, 17, 10, 4, 13 ]
[ [ 26, 2 ], [ 27, 13 ], [ 26, 27 ] ]
[ "s = set(list(input()))\n\nif any(s == set(list(i)) for i in [\"NS\",\"EW\",\"NEWS\"]):\n print(\"Yes\")\nelse:\n print(\"No\")", "s = set(list(input()))", "s", "set(list(input()))", "set", "list(input())", "list", "input()", "input", "if any(s == set(list(i)) for i in [\"NS\",\"EW\",\"NEWS\"]):\n print(\"Yes\")\nelse:\n print(\"No\")", "any(s == set(list(i)) for i in [\"NS\",\"EW\",\"NEWS\"])", "any", "s == set(list(i))", "s", "set(list(i))", "set", "list(i)", "list", "i", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "s = set(list(input()))", "set(list(input()))", "s" ]
s = set(list(input())) if any(s == set(list(i)) for i in ["NS","EW","NEWS"]): print("Yes") else: print("No")
[ 7, 0, 13, 4, 13, 0, 13, 21, 22, 17, 17, 22, 17, 17, 22, 17, 17, 22, 17, 17, 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, 21, 13 ]
[ [ 51, 2 ], [ 54, 6 ], [ 22, 21 ], [ 52, 21 ], [ 27, 24 ], [ 55, 25 ], [ 21, 26 ], [ 55, 32 ], [ 55, 35 ], [ 55, 39 ], [ 55, 42 ], [ 51, 52 ], [ 54, 55 ] ]
[ "s=input()\nryoko={'S':False,'N':False,'W':False,'E':False}\nfor c in s:\n ryoko[c]=True\nif (ryoko['S']!=ryoko['N']) or (ryoko['W']!=ryoko['E']):\n print('No')\nelse:\n print('Yes')", "s=input()", "s", "input()", "input", "ryoko={'S':False,'N':False,'W':False,'E':False}", "ryoko", "{'S':False,'N':False,'W':False,'E':False}", "'S'", "'S'", "False", "'N'", "'N'", "False", "'W'", "'W'", "False", "'E'", "'E'", "False", "for c in s:\n ryoko[c]=True", "c", "s", "ryoko[c]=True", "ryoko[c]", "ryoko", "c", "True", "if (ryoko['S']!=ryoko['N']) or (ryoko['W']!=ryoko['E']):\n print('No')\nelse:\n print('Yes')", "(ryoko['S']!=ryoko['N']) or (ryoko['W']!=ryoko['E'])", "ryoko['S']!=ryoko['N']", "ryoko['S']", "ryoko", "'S'", "ryoko['N']", "ryoko", "'N'", "ryoko['W']!=ryoko['E']", "ryoko['W']", "ryoko", "'W'", "ryoko['E']", "ryoko", "'E'", "print('No')", "print", "'No'", "print('Yes')", "print", "'Yes'", "s=input()", "input()", "s", "ryoko={'S':False,'N':False,'W':False,'E':False}", "{'S':False,'N':False,'W':False,'E':False}", "ryoko" ]
s=input() ryoko={'S':False,'N':False,'W':False,'E':False} for c in s: ryoko[c]=True if (ryoko['S']!=ryoko['N']) or (ryoko['W']!=ryoko['E']): print('No') else: print('Yes')
[ 7, 15, 13, 0, 13, 4, 13, 4, 13, 0, 13, 4, 18, 13, 13, 13, 14, 2, 40, 18, 13, 17, 17, 2, 18, 13, 17, 17, 4, 13, 17, 14, 2, 40, 18, 13, 17, 17, 2, 18, 13, 17, 17, 4, 13, 17, 14, 2, 40, 18, 13, 17, 17, 2, 18, 13, 17, 17, 4, 13, 17, 14, 2, 40, 18, 13, 17, 17, 2, 18, 13, 17, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13 ]
[ [ 83, 4 ], [ 80, 10 ], [ 84, 15 ], [ 81, 20 ], [ 81, 25 ], [ 81, 35 ], [ 81, 40 ], [ 81, 50 ], [ 81, 55 ], [ 81, 65 ], [ 81, 70 ], [ 80, 81 ], [ 83, 84 ] ]
[ "import collections\n\ns = list(input())\ncounter_s = collections.Counter(s)\nif counter_s[\"N\"] != 0 and counter_s[\"S\"] == 0:\n print(\"No\")\nelif counter_s[\"S\"] != 0 and counter_s[\"N\"] == 0:\n print(\"No\")\nelif counter_s[\"W\"] != 0 and counter_s[\"E\"] == 0:\n print(\"No\")\nelif counter_s[\"E\"] != 0 and counter_s[\"W\"] == 0:\n print(\"No\")\nelse:\n print(\"Yes\")", "import collections", "collections", "s = list(input())", "s", "list(input())", "list", "input()", "input", "counter_s = collections.Counter(s)", "counter_s", "collections.Counter(s)", "collections.Counter", "collections", "Counter", "s", "if counter_s[\"N\"] != 0 and counter_s[\"S\"] == 0:\n print(\"No\")\nelif counter_s[\"S\"] != 0 and counter_s[\"N\"] == 0:\n print(\"No\")\nelif counter_s[\"W\"] != 0 and counter_s[\"E\"] == 0:\n print(\"No\")\nelif counter_s[\"E\"] != 0 and counter_s[\"W\"] == 0:\n print(\"No\")\nelse:\n print(\"Yes\")", "counter_s[\"N\"] != 0 and counter_s[\"S\"] == 0", "counter_s[\"N\"] != 0", "counter_s[\"N\"]", "counter_s", "\"N\"", "0", "counter_s[\"S\"] == 0", "counter_s[\"S\"]", "counter_s", "\"S\"", "0", "print(\"No\")", "print", "\"No\"", "elif counter_s[\"S\"] != 0 and counter_s[\"N\"] == 0:\n print(\"No\")", "counter_s[\"S\"] != 0 and counter_s[\"N\"] == 0", "counter_s[\"S\"] != 0", "counter_s[\"S\"]", "counter_s", "\"S\"", "0", "counter_s[\"N\"] == 0", "counter_s[\"N\"]", "counter_s", "\"N\"", "0", "print(\"No\")", "print", "\"No\"", "elif counter_s[\"W\"] != 0 and counter_s[\"E\"] == 0:\n print(\"No\")", "counter_s[\"W\"] != 0 and counter_s[\"E\"] == 0", "counter_s[\"W\"] != 0", "counter_s[\"W\"]", "counter_s", "\"W\"", "0", "counter_s[\"E\"] == 0", "counter_s[\"E\"]", "counter_s", "\"E\"", "0", "print(\"No\")", "print", "\"No\"", "elif counter_s[\"E\"] != 0 and counter_s[\"W\"] == 0:\n print(\"No\")", "counter_s[\"E\"] != 0 and counter_s[\"W\"] == 0", "counter_s[\"E\"] != 0", "counter_s[\"E\"]", "counter_s", "\"E\"", "0", "counter_s[\"W\"] == 0", "counter_s[\"W\"]", "counter_s", "\"W\"", "0", "print(\"No\")", "print", "\"No\"", "print(\"Yes\")", "print", "\"Yes\"", "counter_s = collections.Counter(s)", "collections.Counter(s)", "counter_s", "s = list(input())", "list(input())", "s" ]
import collections s = list(input()) counter_s = collections.Counter(s) if counter_s["N"] != 0 and counter_s["S"] == 0: print("No") elif counter_s["S"] != 0 and counter_s["N"] == 0: print("No") elif counter_s["W"] != 0 and counter_s["E"] == 0: print("No") elif counter_s["E"] != 0 and counter_s["W"] == 0: print("No") else: print("Yes")
[ 7, 15, 13, 0, 13, 4, 13, 0, 13, 39, 17, 17, 0, 13, 2, 2, 2, 17, 13, 2, 17, 13, 2, 2, 17, 13, 2, 17, 13, 4, 13, 18, 13, 13, 10, 4, 13, 10, 2, 13, 10, 39, 13 ]
[ [ 35, 4 ], [ 41, 8 ], [ 38, 13 ], [ 36, 18 ], [ 36, 21 ], [ 36, 25 ], [ 36, 28 ], [ 42, 32 ], [ 39, 33 ], [ 35, 36 ], [ 38, 39 ], [ 41, 42 ] ]
[ "import numpy as np\n\ns = input()\nans = ['No', 'Yes']\n\njudge = (('N' in s) == ('S' in s) and ('W' in s) == ('E' in s))\nprint(ans[judge])", "import numpy as np", "numpy", "s = input()", "s", "input()", "input", "ans = ['No', 'Yes']", "ans", "['No', 'Yes']", "'No'", "'Yes'", "judge = (('N' in s) == ('S' in s) and ('W' in s) == ('E' in s))", "judge", "('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(ans[judge])", "print", "ans[judge]", "ans", "judge", "s = input()", "input()", "s", "judge = (('N' in s) == ('S' in s) and ('W' in s) == ('E' in s))", "('N' in s) == ('S' in s) and ('W' in s) == ('E' in s)", "judge", "ans = ['No', 'Yes']", "['No', 'Yes']", "ans" ]
import numpy as np s = input() ans = ['No', 'Yes'] judge = (('N' in s) == ('S' in s) and ('W' in s) == ('E' in s)) print(ans[judge])
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 17, 14, 2, 17, 13, 0, 13, 17, 14, 2, 17, 13, 0, 13, 17, 14, 2, 17, 13, 0, 13, 17, 14, 2, 17, 13, 0, 13, 17, 4, 13, 8, 2, 13, 17, 17, 17, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 62, 2 ], [ 50, 6 ], [ 63, 9 ], [ 65, 11 ], [ 63, 16 ], [ 53, 18 ], [ 63, 23 ], [ 56, 25 ], [ 63, 30 ], [ 68, 32 ], [ 63, 37 ], [ 59, 39 ], [ 60, 45 ], [ 69, 45 ], [ 57, 45 ], [ 54, 45 ], [ 66, 45 ], [ 50, 51 ], [ 53, 54 ], [ 56, 57 ], [ 59, 60 ], [ 62, 63 ], [ 65, 66 ], [ 68, 69 ] ]
[ "s = input()\nl = len(s)\njudge = 0\nif 'N' in s:\n judge += 1000\nif 'W' in s:\n judge += 1\nif 'S' in s:\n judge -= 1000\nif 'E' in s:\n judge -= 1\n\nprint('Yes' if judge == 0 else 'No')", "s = input()", "s", "input()", "input", "l = len(s)", "l", "len(s)", "len", "s", "judge = 0", "judge", "0", "if 'N' in s:\n judge += 1000", "'N' in s", "'N'", "s", "judge += 1000", "judge", "1000", "if 'W' in s:\n judge += 1", "'W' in s", "'W'", "s", "judge += 1", "judge", "1", "if 'S' in s:\n judge -= 1000", "'S' in s", "'S'", "s", "judge -= 1000", "judge", "1000", "if 'E' in s:\n judge -= 1", "'E' in s", "'E'", "s", "judge -= 1", "judge", "1", "print('Yes' if judge == 0 else 'No')", "print", "'Yes' if judge == 0 else 'No'", "judge == 0", "judge", "0", "'Yes'", "'No'", "l = len(s)", "len(s)", "l", "judge += 1000", "1000", "judge", "judge += 1", "1", "judge", "judge -= 1", "1", "judge", "s = input()", "input()", "s", "judge = 0", "0", "judge", "judge -= 1000", "1000", "judge" ]
s = input() l = len(s) judge = 0 if 'N' in s: judge += 1000 if 'W' in s: judge += 1 if 'S' in s: judge -= 1000 if 'E' in s: judge -= 1 print('Yes' if judge == 0 else 'No')
[ 7, 0, 13, 4, 13, 14, 2, 2, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 4, 13, 17, 4, 13, 14, 2, 2, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 4, 13, 17, 4, 13, 14, 2, 2, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 4, 13, 17, 4, 13, 14, 2, 2, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 4, 13, 17, 4, 13, 4, 13, 17, 10, 4, 13 ]
[ [ 93, 2 ], [ 94, 10 ], [ 94, 17 ], [ 94, 31 ], [ 94, 38 ], [ 94, 52 ], [ 94, 59 ], [ 94, 73 ], [ 94, 80 ], [ 93, 94 ] ]
[ "s=input()\n\nif s.count(\"N\")>0 and s.count(\"S\")==0:\n print(\"No\")\n exit()\nif s.count(\"S\")>0 and s.count(\"N\")==0:\n print(\"No\")\n exit()\nif s.count(\"W\")>0 and s.count(\"E\")==0:\n print(\"No\")\n exit()\nif s.count(\"E\")>0 and s.count(\"W\")==0:\n print(\"No\")\n exit()\nelse:\n print(\"Yes\") ", "s=input()", "s", "input()", "input", "if s.count(\"N\")>0 and s.count(\"S\")==0:\n print(\"No\")\n exit()", "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", "print(\"No\")", "print", "\"No\"", "exit()", "exit", "if s.count(\"S\")>0 and s.count(\"N\")==0:\n print(\"No\")\n exit()", "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(\"No\")", "print", "\"No\"", "exit()", "exit", "if s.count(\"W\")>0 and s.count(\"E\")==0:\n print(\"No\")\n exit()", "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(\"No\")", "print", "\"No\"", "exit()", "exit", "if s.count(\"E\")>0 and s.count(\"W\")==0:\n print(\"No\")\n exit()\nelse:\n print(\"Yes\") ", "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", "print(\"No\")", "print", "\"No\"", "exit()", "exit", "print(\"Yes\")", "print", "\"Yes\"", "s=input()", "input()", "s" ]
s=input() if s.count("N")>0 and s.count("S")==0: print("No") exit() if s.count("S")>0 and s.count("N")==0: print("No") exit() if s.count("W")>0 and s.count("E")==0: print("No") exit() if s.count("E")>0 and s.count("W")==0: print("No") exit() else: print("Yes")
[ 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, 0, 13, 4, 18, 4, 13, 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, 4, 13, 8, 2, 13, 13, 17, 17, 10, 18, 13, 10, 2, 13, 10, 18, 13, 10, 2, 13, 10, 2, 13, 10, 18, 13, 10, 4, 13, 10, 40, 13, 10, 40, 13, 10, 2, 13 ]
[ [ 90, 4 ], [ 81, 13 ], [ 75, 22 ], [ 93, 31 ], [ 91, 35 ], [ 78, 38 ], [ 94, 41 ], [ 102, 42 ], [ 94, 45 ], [ 84, 46 ], [ 94, 49 ], [ 87, 50 ], [ 85, 53 ], [ 94, 53 ], [ 96, 55 ], [ 79, 58 ], [ 85, 59 ], [ 94, 59 ], [ 99, 61 ], [ 103, 64 ], [ 88, 65 ], [ 97, 70 ], [ 100, 71 ], [ 75, 76 ], [ 78, 79 ], [ 81, 82 ], [ 84, 85 ], [ 87, 88 ], [ 90, 91 ], [ 93, 94 ], [ 96, 97 ], [ 99, 100 ], [ 102, 103 ] ]
[ "import sys\n\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\n\nS = read().decode()\n\nN, W, S, E = 'N' in S, 'W' in S, 'S' in S, 'E' in S\n\ncond1 = not N ^ S\ncond2 = not W ^ E\n\nprint('Yes' if cond1 and cond2 else 'No')", "import sys", "sys", "read = sys.stdin.buffer.read", "read", "sys.stdin.buffer.read", "sys.stdin.buffer", "sys.stdin", "sys", "stdin", "buffer", "read", "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", "S = read().decode()", "S", "read().decode()", "().decode", "()", "read", "decode", "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", "cond1 = not N ^ S", "cond1", "not N ^ S", "N ^ S", "N", "S", "cond2 = not W ^ E", "cond2", "not W ^ E", "W ^ E", "W", "E", "print('Yes' if cond1 and cond2 else 'No')", "print", "'Yes' if cond1 and cond2 else 'No'", "cond1 and cond2", "cond1", "cond2", "'Yes'", "'No'", "readlines = sys.stdin.buffer.readlines", "sys.stdin.buffer.readlines", "readlines", "N, W, S, E = 'N' in S, 'W' in S, 'S' in S, 'E' in S", "'N' in S", "N", "readline = sys.stdin.buffer.readline", "sys.stdin.buffer.readline", "readline", "S, E = 'N' in S, 'W' in S, 'S' in S, 'E' in S", "'S' in S", "S", "E = 'N' in S, 'W' in S, 'S' in S, 'E' in S", "'E' in S", "E", "read = sys.stdin.buffer.read", "sys.stdin.buffer.read", "read", "S = read().decode()", "read().decode()", "S", "cond1 = not N ^ S", "not N ^ S", "cond1", "cond2 = not W ^ E", "not W ^ E", "cond2", "W, S, E = 'N' in S, 'W' in S, 'S' in S, 'E' in S", "'W' in S", "W" ]
import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines S = read().decode() N, W, S, E = 'N' in S, 'W' in S, 'S' in S, 'E' in S cond1 = not N ^ S cond2 = not W ^ E print('Yes' if cond1 and cond2 else 'No')
[ 7, 0, 13, 4, 13, 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, 14, 2, 13, 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 ]
[ [ 76, 2 ], [ 73, 6 ], [ 13, 12 ], [ 77, 12 ], [ 12, 16 ], [ 22, 19 ], [ 74, 20 ], [ 12, 25 ], [ 31, 28 ], [ 74, 29 ], [ 12, 34 ], [ 40, 37 ], [ 74, 38 ], [ 12, 43 ], [ 49, 46 ], [ 74, 47 ], [ 74, 54 ], [ 74, 57 ], [ 74, 61 ], [ 74, 64 ], [ 73, 74 ], [ 76, 77 ] ]
[ "S = input()\n\nL = [0] * 4\n\nfor s in S:\n if s == \"N\":\n L[0] = 1\n elif s == \"S\":\n L[1] = 1\n elif s == \"E\":\n L[2] = 1\n elif s == \"W\":\n L[3] = 1\n\nif L[0] == L[1] and L[2] == L[3]:\n print(\"Yes\")\nelse:\n print(\"No\")", "S = input()", "S", "input()", "input", "L = [0] * 4", "L", "[0] * 4", "[0]", "0", "4", "for s in S:\n if s == \"N\":\n L[0] = 1\n elif s == \"S\":\n L[1] = 1\n elif s == \"E\":\n L[2] = 1\n elif s == \"W\":\n L[3] = 1", "s", "S", "if s == \"N\":\n L[0] = 1\n elif s == \"S\":\n L[1] = 1\n elif s == \"E\":\n L[2] = 1\n elif s == \"W\":\n L[3] = 1", "s == \"N\"", "s", "\"N\"", "L[0] = 1", "L[0]", "L", "0", "1", "elif s == \"S\":\n L[1] = 1\n ", "s == \"S\"", "s", "\"S\"", "L[1] = 1", "L[1]", "L", "1", "1", "elif s == \"E\":\n L[2] = 1\n ", "s == \"E\"", "s", "\"E\"", "L[2] = 1", "L[2]", "L", "2", "1", "elif s == \"W\":\n L[3] = 1", "s == \"W\"", "s", "\"W\"", "L[3] = 1", "L[3]", "L", "3", "1", "if L[0] == L[1] and L[2] == L[3]:\n print(\"Yes\")\nelse:\n print(\"No\")", "L[0] == L[1] and L[2] == L[3]", "L[0] == L[1]", "L[0]", "L", "0", "L[1]", "L", "1", "L[2] == L[3]", "L[2]", "L", "2", "L[3]", "L", "3", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "L = [0] * 4", "[0] * 4", "L", "S = input()", "input()", "S" ]
S = input() L = [0] * 4 for s in S: if s == "N": L[0] = 1 elif s == "S": L[1] = 1 elif s == "E": L[2] = 1 elif s == "W": L[3] = 1 if L[0] == L[1] and L[2] == L[3]: print("Yes") else: print("No")
[ 7, 15, 13, 15, 13, 15, 0, 13, 12, 2, 4, 13, 13, 17, 23, 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, 17, 0, 13, 4, 18, 4, 18, 4, 13, 13, 13, 0, 13, 4, 13, 13, 28, 13, 13, 0, 18, 13, 13, 17, 28, 13, 39, 39, 17, 17, 39, 17, 17, 14, 2, 4, 13, 18, 13, 18, 13, 17, 18, 13, 18, 13, 17, 17, 14, 40, 4, 13, 18, 13, 18, 13, 17, 18, 13, 18, 13, 17, 17, 4, 13, 17, 4, 18, 13, 13, 4, 13, 17, 10, 18, 13, 10, 12, 13, 10, 4, 13, 10, 18, 13, 10, 18, 13, 10, 4, 13 ]
[ [ 123, 7 ], [ 132, 16 ], [ 129, 25 ], [ 120, 34 ], [ 135, 48 ], [ 130, 54 ], [ 126, 58 ], [ 64, 63 ], [ 136, 63 ], [ 69, 66 ], [ 127, 67 ], [ 63, 68 ], [ 72, 71 ], [ 127, 84 ], [ 71, 86 ], [ 127, 89 ], [ 71, 91 ], [ 127, 99 ], [ 71, 101 ], [ 127, 104 ], [ 71, 106 ], [ 120, 121 ], [ 123, 124 ], [ 126, 127 ], [ 129, 130 ], [ 132, 133 ], [ 135, 136 ] ]
[ "#! /usr/bin/env python3\n\nimport sys\nimport numpy as np\nfrom collections import defaultdict\nint1 = lambda x: int(x) - 1\nread = sys.stdin.buffer.read\nreadline = sys.stdin.buffer.readline\nreadlines = sys.stdin.buffer.readlines\nsys.setrecursionlimit(500000)\n\nS = readline().decode().rstrip()\ndicts = defaultdict(int)\n\nfor c in S:\n dicts[c] += 1\n\nfor pair in [('N', 'S'), ('W', 'E')]:\n if min(dicts[pair[0]], dicts[pair[1]]) == 0:\n if max(dicts[pair[0]], dicts[pair[1]]) != 0:\n print('No')\n sys.exit()\nprint('Yes')\n", "import sys", "sys", "import numpy as np", "numpy", "from collections import defaultdict", "int1 = lambda x: int(x) - 1", "int1", "lambda x: int(x) - 1", "int(x) - 1", "int(x)", "int", "x", "1", "x", "read = sys.stdin.buffer.read", "read", "sys.stdin.buffer.read", "sys.stdin.buffer", "sys.stdin", "sys", "stdin", "buffer", "read", "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", "sys.setrecursionlimit(500000)", "sys.setrecursionlimit", "sys", "setrecursionlimit", "500000", "S = readline().decode().rstrip()", "S", "readline().decode().rstrip()", "().decode().rstrip", "().decode()", "().decode", "()", "readline", "decode", "rstrip", "dicts = defaultdict(int)", "dicts", "defaultdict(int)", "defaultdict", "int", "for c in S:\n dicts[c] += 1", "c", "S", "dicts[c] += 1", "dicts[c]", "dicts", "c", "1", "for pair in [('N', 'S'), ('W', 'E')]:\n if min(dicts[pair[0]], dicts[pair[1]]) == 0:\n if max(dicts[pair[0]], dicts[pair[1]]) != 0:\n print('No')\n sys.exit()", "pair", "[('N', 'S'), ('W', 'E')]", "('N', 'S')", "'N'", "'S'", "('W', 'E')", "'W'", "'E'", "if min(dicts[pair[0]], dicts[pair[1]]) == 0:\n if max(dicts[pair[0]], dicts[pair[1]]) != 0:\n print('No')\n sys.exit()", "min(dicts[pair[0]], dicts[pair[1]]) == 0", "min(dicts[pair[0]], dicts[pair[1]])", "min", "dicts[pair[0]]", "dicts", "pair[0]", "pair", "0", "dicts[pair[1]]", "dicts", "pair[1]", "pair", "1", "0", "if max(dicts[pair[0]], dicts[pair[1]]) != 0:\n print('No')\n sys.exit()", "max(dicts[pair[0]], dicts[pair[1]]) != 0", "max(dicts[pair[0]], dicts[pair[1]])", "max", "dicts[pair[0]]", "dicts", "pair[0]", "pair", "0", "dicts[pair[1]]", "dicts", "pair[1]", "pair", "1", "0", "print('No')", "print", "'No'", "sys.exit()", "sys.exit", "sys", "exit", "print('Yes')", "print", "'Yes'", "readlines = sys.stdin.buffer.readlines", "sys.stdin.buffer.readlines", "readlines", "int1 = lambda x: int(x) - 1", "lambda x: int(x) - 1", "int1", "dicts = defaultdict(int)", "defaultdict(int)", "dicts", "readline = sys.stdin.buffer.readline", "sys.stdin.buffer.readline", "readline", "read = sys.stdin.buffer.read", "sys.stdin.buffer.read", "read", "S = readline().decode().rstrip()", "readline().decode().rstrip()", "S" ]
#! /usr/bin/env python3 import sys import numpy as np from collections import defaultdict int1 = lambda x: int(x) - 1 read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines sys.setrecursionlimit(500000) S = readline().decode().rstrip() dicts = defaultdict(int) for c in S: dicts[c] += 1 for pair in [('N', 'S'), ('W', 'E')]: if min(dicts[pair[0]], dicts[pair[1]]) == 0: if max(dicts[pair[0]], dicts[pair[1]]) != 0: print('No') sys.exit() print('Yes')
[ 7, 0, 13, 4, 13, 4, 13, 8, 2, 2, 2, 17, 13, 2, 17, 13, 2, 2, 17, 13, 2, 17, 13, 17, 17, 10, 4, 13 ]
[ [ 26, 2 ], [ 27, 12 ], [ 27, 15 ], [ 27, 19 ], [ 27, 22 ], [ 26, 27 ] ]
[ "S=input()\nprint(\"Yes\" if (\"N\" in S)==(\"S\" in S) and (\"W\" in S)==(\"E\" in S) else \"No\")", "S=input()", "S", "input()", "input", "print(\"Yes\" if (\"N\" in S)==(\"S\" in S) and (\"W\" in S)==(\"E\" in S) else \"No\")", "print", "\"Yes\" if (\"N\" in S)==(\"S\" in S) and (\"W\" in S)==(\"E\" in S) else \"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", "\"Yes\"", "\"No\"", "S=input()", "input()", "S" ]
S=input() print("Yes" if ("N" in S)==("S" in S) and ("W" in S)==("E" in S) else "No")
[ 7, 15, 13, 15, 0, 13, 12, 4, 13, 4, 18, 18, 13, 13, 13, 0, 13, 12, 4, 13, 13, 4, 18, 4, 18, 18, 13, 13, 13, 13, 0, 13, 12, 4, 13, 4, 13, 0, 13, 12, 4, 13, 13, 4, 18, 4, 18, 18, 13, 13, 13, 13, 0, 13, 12, 4, 13, 4, 13, 0, 13, 4, 13, 14, 2, 2, 2, 2, 17, 13, 2, 17, 13, 2, 17, 13, 2, 17, 13, 4, 13, 17, 4, 13, 14, 2, 2, 2, 17, 13, 2, 17, 13, 2, 40, 17, 13, 40, 17, 13, 4, 13, 17, 4, 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, 10, 12, 13, 10, 12, 13, 10, 12, 13, 10, 12, 13, 10, 12, 13 ]
[ [ 136, 5 ], [ 142, 16 ], [ 133, 31 ], [ 143, 36 ], [ 139, 38 ], [ 145, 53 ], [ 140, 58 ], [ 130, 60 ], [ 131, 69 ], [ 131, 72 ], [ 131, 75 ], [ 131, 78 ], [ 131, 89 ], [ 131, 92 ], [ 131, 96 ], [ 131, 99 ], [ 131, 110 ], [ 131, 113 ], [ 131, 117 ], [ 131, 120 ], [ 130, 131 ], [ 133, 134 ], [ 136, 137 ], [ 139, 140 ], [ 142, 143 ], [ 145, 146 ] ]
[ "import sys\nfrom collections import Counter\n\ninint = lambda: int(sys.stdin.readline())\ninintm = lambda: map(int, sys.stdin.readline().split())\ninintl = lambda: list(inintm())\ninstrm = lambda: map(str, sys.stdin.readline().split())\ninstrl = lambda: list(instrm())\n\ns = input()\n\nif \"N\" in s and \"S\" in s and \"E\" in s and \"W\" in s:\n print(\"Yes\")\n exit()\n\nif (\"N\" in s and \"S\" in s) and (\"E\" not in s and \"W\" not in s):\n print(\"Yes\")\n exit()\n\nif (\"E\" in s and \"W\" in s) and (\"N\" not in s and \"S\" not in s):\n print(\"Yes\")\n exit()\n\nprint(\"No\")", "import sys", "sys", "from collections import Counter", "inint = lambda: int(sys.stdin.readline())", "inint", "lambda: int(sys.stdin.readline())", "int(sys.stdin.readline())", "int", "sys.stdin.readline()", "sys.stdin.readline", "sys.stdin", "sys", "stdin", "readline", "inintm = lambda: map(int, sys.stdin.readline().split())", "inintm", "lambda: map(int, sys.stdin.readline().split())", "map(int, sys.stdin.readline().split())", "map", "int", "sys.stdin.readline().split()", "sys.stdin.readline().split", "sys.stdin.readline()", "sys.stdin.readline", "sys.stdin", "sys", "stdin", "readline", "split", "inintl = lambda: list(inintm())", "inintl", "lambda: list(inintm())", "list(inintm())", "list", "inintm()", "inintm", "instrm = lambda: map(str, sys.stdin.readline().split())", "instrm", "lambda: map(str, sys.stdin.readline().split())", "map(str, sys.stdin.readline().split())", "map", "str", "sys.stdin.readline().split()", "sys.stdin.readline().split", "sys.stdin.readline()", "sys.stdin.readline", "sys.stdin", "sys", "stdin", "readline", "split", "instrl = lambda: list(instrm())", "instrl", "lambda: list(instrm())", "list(instrm())", "list", "instrm()", "instrm", "s = input()", "s", "input()", "input", "if \"N\" in s and \"S\" in s and \"E\" in s and \"W\" in s:\n print(\"Yes\")\n exit()", "\"N\" in s and \"S\" in s and \"E\" in s and \"W\" in s", "\"N\" in s and \"S\" in s and \"E\" in s", "\"N\" in s and \"S\" in s", "\"N\" in s", "\"N\"", "s", "\"S\" in s", "\"S\"", "s", "\"E\" in s", "\"E\"", "s", "\"W\" in s", "\"W\"", "s", "print(\"Yes\")", "print", "\"Yes\"", "exit()", "exit", "if (\"N\" in s and \"S\" in s) and (\"E\" not in s and \"W\" not in s):\n print(\"Yes\")\n exit()", "(\"N\" in s and \"S\" in s) and (\"E\" not in s and \"W\" not in s)", "\"N\" in s and \"S\" in s", "\"N\" in s", "\"N\"", "s", "\"S\" in s", "\"S\"", "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\"", "exit()", "exit", "if (\"E\" in s and \"W\" in s) and (\"N\" not in s and \"S\" not in s):\n print(\"Yes\")\n exit()", "(\"E\" in s and \"W\" in s) and (\"N\" not in s and \"S\" not in s)", "\"E\" in s and \"W\" in s", "\"E\" in s", "\"E\"", "s", "\"W\" in s", "\"W\"", "s", "\"N\" not in s and \"S\" not in s", "\"N\" not in s", "\"N\"", "s", "\"S\" not in s", "\"S\"", "s", "print(\"Yes\")", "print", "\"Yes\"", "exit()", "exit", "print(\"No\")", "print", "\"No\"", "s = input()", "input()", "s", "inintl = lambda: list(inintm())", "lambda: list(inintm())", "inintl", "inint = lambda: int(sys.stdin.readline())", "lambda: int(sys.stdin.readline())", "inint", "instrm = lambda: map(str, sys.stdin.readline().split())", "lambda: map(str, sys.stdin.readline().split())", "instrm", "inintm = lambda: map(int, sys.stdin.readline().split())", "lambda: map(int, sys.stdin.readline().split())", "inintm", "instrl = lambda: list(instrm())", "lambda: list(instrm())", "instrl" ]
import sys from collections import Counter inint = lambda: int(sys.stdin.readline()) inintm = lambda: map(int, sys.stdin.readline().split()) inintl = lambda: list(inintm()) instrm = lambda: map(str, sys.stdin.readline().split()) instrl = lambda: list(instrm()) s = input() if "N" in s and "S" in s and "E" in s and "W" in s: print("Yes") exit() if ("N" in s and "S" in s) and ("E" not in s and "W" not in s): print("Yes") exit() if ("E" in s and "W" in s) and ("N" not in s and "S" not in s): print("Yes") exit() print("No")
[ 7, 0, 13, 4, 18, 17, 13, 4, 13, 4, 13, 4, 13, 4, 13, 8, 2, 2, 2, 13, 17, 2, 13, 17, 2, 13, 17, 17, 17, 10, 4, 13 ]
[ [ 30, 2 ], [ 31, 19 ], [ 31, 22 ], [ 31, 25 ], [ 30, 31 ] ]
[ "S=\"\".join(sorted(set(input())))\nprint(\"Yes\" if S==\"ENSW\" or S==\"NS\" or S==\"EW\" else \"No\")", "S=\"\".join(sorted(set(input())))", "S", "\"\".join(sorted(set(input())))", "\"\".join", "\"\"", "join", "sorted(set(input()))", "sorted", "set(input())", "set", "input()", "input", "print(\"Yes\" if S==\"ENSW\" or S==\"NS\" or S==\"EW\" else \"No\")", "print", "\"Yes\" if S==\"ENSW\" or S==\"NS\" or S==\"EW\" else \"No\"", "S==\"ENSW\" or S==\"NS\" or S==\"EW\"", "S==\"ENSW\" or S==\"NS\"", "S==\"ENSW\"", "S", "\"ENSW\"", "S==\"NS\"", "S", "\"NS\"", "S==\"EW\"", "S", "\"EW\"", "\"Yes\"", "\"No\"", "S=\"\".join(sorted(set(input())))", "\"\".join(sorted(set(input())))", "S" ]
S="".join(sorted(set(input()))) print("Yes" if S=="ENSW" or S=="NS" or S=="EW" else "No")
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 28, 13, 13, 4, 18, 13, 13, 13, 14, 2, 4, 13, 13, 17, 4, 13, 17, 14, 2, 2, 4, 13, 13, 17, 2, 2, 2, 17, 13, 2, 17, 13, 2, 2, 17, 13, 2, 17, 13, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13 ]
[ [ 55, 2 ], [ 58, 6 ], [ 11, 10 ], [ 56, 10 ], [ 59, 14 ], [ 10, 16 ], [ 59, 21 ], [ 59, 31 ], [ 59, 37 ], [ 59, 40 ], [ 59, 44 ], [ 59, 47 ], [ 55, 56 ], [ 58, 59 ] ]
[ "S = input()\ns_set = set()\nfor s in S:\n s_set.add(s)\nif len(s_set) == 4:\n print('Yes')\nelif len(s_set) == 2 and (('W' in s_set and 'E' in s_set) or \\\n('S' in s_set and 'N' in s_set)):\n print('Yes')\nelse:\n print('No')", "S = input()", "S", "input()", "input", "s_set = set()", "s_set", "set()", "set", "for s in S:\n s_set.add(s)", "s", "S", "s_set.add(s)", "s_set.add", "s_set", "add", "s", "if len(s_set) == 4:\n print('Yes')\nelif len(s_set) == 2 and (('W' in s_set and 'E' in s_set) or \\\n('S' in s_set and 'N' in s_set)):\n print('Yes')\nelse:\n print('No')", "len(s_set) == 4", "len(s_set)", "len", "s_set", "4", "print('Yes')", "print", "'Yes'", "elif len(s_set) == 2 and (('W' in s_set and 'E' in s_set) or \\\n('S' in s_set and 'N' in s_set)):\n print('Yes')", "len(s_set) == 2 and (('W' in s_set and 'E' in s_set) or \\\n('S' in s_set and 'N' in s_set))", "len(s_set) == 2", "len(s_set)", "len", "s_set", "2", "('W' in s_set and 'E' in s_set) or \\\n('S' in s_set and 'N' in s_set)", "'W' in s_set and 'E' in s_set", "'W' in s_set", "'W'", "s_set", "'E' in s_set", "'E'", "s_set", "'S' in s_set and 'N' in s_set", "'S' in s_set", "'S'", "s_set", "'N' in s_set", "'N'", "s_set", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "S = input()", "input()", "S", "s_set = set()", "set()", "s_set" ]
S = input() s_set = set() for s in S: s_set.add(s) if len(s_set) == 4: print('Yes') elif len(s_set) == 2 and (('W' in s_set and 'E' in s_set) or \ ('S' in s_set and 'N' in s_set)): print('Yes') else: print('No')
[ 7, 15, 15, 13, 15, 13, 15, 13, 0, 13, 18, 13, 13, 0, 13, 17, 12, 13, 0, 13, 4, 18, 4, 13, 13, 0, 13, 17, 0, 13, 17, 0, 13, 17, 0, 13, 17, 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, 2, 2, 2, 2, 13, 13, 13, 13, 17, 2, 2, 2, 13, 13, 17, 2, 2, 13, 13, 17, 2, 2, 2, 13, 13, 17, 2, 2, 13, 13, 17, 4, 13, 17, 4, 13, 17, 14, 2, 13, 17, 4, 13, 10, 12, 13, 10, 18, 13, 10, 17, 13 ]
[ [ 114, 9 ], [ 117, 14 ], [ 20, 19 ], [ 115, 23 ], [ 27, 26 ], [ 30, 29 ], [ 33, 32 ], [ 36, 35 ], [ 39, 38 ], [ 19, 38 ], [ 38, 42 ], [ 46, 45 ], [ 38, 49 ], [ 53, 52 ], [ 38, 56 ], [ 60, 59 ], [ 63, 62 ], [ 62, 71 ], [ 32, 71 ], [ 59, 72 ], [ 29, 72 ], [ 52, 73 ], [ 35, 73 ], [ 45, 74 ], [ 26, 74 ], [ 62, 79 ], [ 32, 79 ], [ 59, 80 ], [ 29, 80 ], [ 52, 84 ], [ 35, 84 ], [ 45, 85 ], [ 26, 85 ], [ 52, 90 ], [ 35, 90 ], [ 45, 91 ], [ 26, 91 ], [ 62, 95 ], [ 32, 95 ], [ 59, 96 ], [ 29, 96 ], [ 112, 109 ], [ 114, 115 ], [ 117, 118 ] ]
[ "from sys import stdin\nimport math\nimport re\nimport queue\n\ninput = stdin.readline\n\nMOD = 1000000007\n\ndef solve():\n str = (input().rstrip())\n W = 0\n N = 0\n S = 0\n E = 0\n\n for s in str:\n if(s == 'W'):\n W += 1\n elif(s =='E'):\n E += 1\n elif(s == 'N'):\n N += 1\n else:\n S += 1\n \n\n if(S*N*E*W > 0 or (S + N == 0 and E*W > 0) or(E +W == 0 and S*N > 0)):\n print(\"Yes\")\n else:\n print(\"No\")\n \nif __name__ == '__main__':\n solve()", "from sys import stdin", "import math", "math", "import re", "re", "import queue", "queue", "input = stdin.readline", "input", "stdin.readline", "stdin", "readline", "MOD = 1000000007", "MOD", "1000000007", "def solve():\n str = (input().rstrip())\n W = 0\n N = 0\n S = 0\n E = 0\n\n for s in str:\n if(s == 'W'):\n W += 1\n elif(s =='E'):\n E += 1\n elif(s == 'N'):\n N += 1\n else:\n S += 1\n \n\n if(S*N*E*W > 0 or (S + N == 0 and E*W > 0) or(E +W == 0 and S*N > 0)):\n print(\"Yes\")\n else:\n print(\"No\")\n ", "solve", "str = (input().rstrip())", "str", "input().rstrip()", "().rstrip", "()", "input", "rstrip", "W = 0", "W", "0", "N = 0", "N", "0", "S = 0", "S", "0", "E = 0", "E", "0", "for s in str:\n if(s == 'W'):\n W += 1\n elif(s =='E'):\n E += 1\n elif(s == 'N'):\n N += 1\n else:\n S += 1\n \n\n ", "s", "str", "if(s == 'W'):\n W += 1\n elif(s =='E'):\n E += 1\n elif(s == 'N'):\n N += 1\n else:\n S += 1\n \n\n ", "s == 'W'", "s", "'W'", "W += 1", "W", "1", "elif(s =='E'):\n E += 1\n ", "s =='E'", "s", "'E'", "E += 1", "E", "1", "elif(s == 'N'):\n N += 1\n ", "s == 'N'", "s", "'N'", "N += 1", "N", "1", "S += 1", "S", "1", "if(S*N*E*W > 0 or (S + N == 0 and E*W > 0) or(E +W == 0 and S*N > 0)):\n print(\"Yes\")\n else:\n print(\"No\")\n ", "S*N*E*W > 0 or (S + N == 0 and E*W > 0) or(E +W == 0 and S*N > 0)", "S*N*E*W > 0 or (S + N == 0 and E*W > 0)", "S*N*E*W > 0", "S*N*E*W", "S*N*E", "S*N", "S", "N", "E", "W", "0", "S + N == 0 and E*W > 0", "S + N == 0", "S + N", "S", "N", "0", "E*W > 0", "E*W", "E", "W", "0", "E +W == 0 and S*N > 0", "E +W == 0", "E +W", "E", "W", "0", "S*N > 0", "S*N", "S", "N", "0", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "if __name__ == '__main__':\n solve()", "__name__ == '__main__'", "__name__", "'__main__'", "solve()", "solve", "def solve():\n str = (input().rstrip())\n W = 0\n N = 0\n S = 0\n E = 0\n\n for s in str:\n if(s == 'W'):\n W += 1\n elif(s =='E'):\n E += 1\n elif(s == 'N'):\n N += 1\n else:\n S += 1\n \n\n if(S*N*E*W > 0 or (S + N == 0 and E*W > 0) or(E +W == 0 and S*N > 0)):\n print(\"Yes\")\n else:\n print(\"No\")\n ", "def solve():\n str = (input().rstrip())\n W = 0\n N = 0\n S = 0\n E = 0\n\n for s in str:\n if(s == 'W'):\n W += 1\n elif(s =='E'):\n E += 1\n elif(s == 'N'):\n N += 1\n else:\n S += 1\n \n\n if(S*N*E*W > 0 or (S + N == 0 and E*W > 0) or(E +W == 0 and S*N > 0)):\n print(\"Yes\")\n else:\n print(\"No\")\n ", "solve", "input = stdin.readline", "stdin.readline", "input", "MOD = 1000000007", "1000000007", "MOD" ]
from sys import stdin import math import re import queue input = stdin.readline MOD = 1000000007 def solve(): str = (input().rstrip()) W = 0 N = 0 S = 0 E = 0 for s in str: if(s == 'W'): W += 1 elif(s =='E'): E += 1 elif(s == 'N'): N += 1 else: S += 1 if(S*N*E*W > 0 or (S + N == 0 and E*W > 0) or(E +W == 0 and S*N > 0)): print("Yes") else: print("No") if __name__ == '__main__': solve()
[ 7, 0, 13, 4, 13, 0, 13, 21, 22, 17, 17, 22, 17, 17, 22, 17, 17, 22, 17, 17, 28, 13, 13, 0, 18, 13, 13, 17, 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, 21, 13, 10, 4, 13 ]
[ [ 103, 2 ], [ 100, 6 ], [ 22, 21 ], [ 104, 21 ], [ 27, 24 ], [ 101, 25 ], [ 21, 26 ], [ 101, 32 ], [ 101, 37 ], [ 101, 49 ], [ 101, 54 ], [ 101, 66 ], [ 101, 71 ], [ 101, 83 ], [ 101, 88 ], [ 100, 101 ], [ 103, 104 ] ]
[ "s = input()\n\nangle = {'N':0, 'W':0, 'S':0, 'E':0}\n\nfor i in s:\n angle[i] += 1\n\n\nif angle['N'] > 0 and angle['S'] == 0:\n print('No')\n exit()\n\nif angle['S'] > 0 and angle['N'] == 0:\n print('No')\n exit()\n\nif angle['W'] > 0 and angle['E'] == 0:\n print('No')\n exit()\n\nif angle['E'] > 0 and angle['W'] == 0:\n print('No')\n exit()\n\nprint('Yes')", "s = input()", "s", "input()", "input", "angle = {'N':0, 'W':0, 'S':0, 'E':0}", "angle", "{'N':0, 'W':0, 'S':0, 'E':0}", "'N'", "'N'", "0", "'W'", "'W'", "0", "'S'", "'S'", "0", "'E'", "'E'", "0", "for i in s:\n angle[i] += 1", "i", "s", "angle[i] += 1", "angle[i]", "angle", "i", "1", "if angle['N'] > 0 and angle['S'] == 0:\n print('No')\n exit()", "angle['N'] > 0 and angle['S'] == 0", "angle['N'] > 0", "angle['N']", "angle", "'N'", "0", "angle['S'] == 0", "angle['S']", "angle", "'S'", "0", "print('No')", "print", "'No'", "exit()", "exit", "if angle['S'] > 0 and angle['N'] == 0:\n print('No')\n exit()", "angle['S'] > 0 and angle['N'] == 0", "angle['S'] > 0", "angle['S']", "angle", "'S'", "0", "angle['N'] == 0", "angle['N']", "angle", "'N'", "0", "print('No')", "print", "'No'", "exit()", "exit", "if angle['W'] > 0 and angle['E'] == 0:\n print('No')\n exit()", "angle['W'] > 0 and angle['E'] == 0", "angle['W'] > 0", "angle['W']", "angle", "'W'", "0", "angle['E'] == 0", "angle['E']", "angle", "'E'", "0", "print('No')", "print", "'No'", "exit()", "exit", "if angle['E'] > 0 and angle['W'] == 0:\n print('No')\n exit()", "angle['E'] > 0 and angle['W'] == 0", "angle['E'] > 0", "angle['E']", "angle", "'E'", "0", "angle['W'] == 0", "angle['W']", "angle", "'W'", "0", "print('No')", "print", "'No'", "exit()", "exit", "print('Yes')", "print", "'Yes'", "angle = {'N':0, 'W':0, 'S':0, 'E':0}", "{'N':0, 'W':0, 'S':0, 'E':0}", "angle", "s = input()", "input()", "s" ]
s = input() angle = {'N':0, 'W':0, 'S':0, 'E':0} for i in s: angle[i] += 1 if angle['N'] > 0 and angle['S'] == 0: print('No') exit() if angle['S'] > 0 and angle['N'] == 0: print('No') exit() if angle['W'] > 0 and angle['E'] == 0: print('No') exit() if angle['E'] > 0 and angle['W'] == 0: print('No') exit() print('Yes')
[ 7, 0, 13, 4, 13, 0, 13, 2, 39, 17, 17, 0, 13, 17, 28, 13, 4, 13, 4, 13, 13, 28, 13, 4, 13, 4, 13, 13, 14, 2, 18, 13, 13, 18, 13, 13, 0, 18, 13, 13, 17, 14, 2, 2, 2, 2, 18, 13, 17, 18, 13, 17, 17, 17, 2, 2, 2, 18, 13, 17, 18, 13, 17, 17, 17, 4, 13, 17, 4, 13, 17, 10, 2, 13, 10, 4, 13, 10, 17, 13 ]
[ [ 75, 2 ], [ 72, 6 ], [ 78, 12 ], [ 16, 15 ], [ 76, 20 ], [ 23, 22 ], [ 79, 27 ], [ 76, 31 ], [ 15, 32 ], [ 79, 34 ], [ 22, 35 ], [ 40, 37 ], [ 73, 38 ], [ 22, 39 ], [ 73, 47 ], [ 73, 50 ], [ 73, 58 ], [ 73, 61 ], [ 72, 73 ], [ 75, 76 ], [ 78, 79 ] ]
[ "s=input()\nans=[0]*4\ncheck='NWSE'\nfor i in range(len(s)):\n for j in range(len(check)):\n if s[i]==check[j]:\n ans[j]=1\nif (ans[0]+ans[2])%2==0 and (ans[1]+ans[3])%2==0:\n print('Yes')\nelse:\n print('No')", "s=input()", "s", "input()", "input", "ans=[0]*4", "ans", "[0]*4", "[0]", "0", "4", "check='NWSE'", "check", "'NWSE'", "for i in range(len(s)):\n for j in range(len(check)):\n if s[i]==check[j]:\n ans[j]=1", "i", "range(len(s))", "range", "len(s)", "len", "s", "for j in range(len(check)):\n if s[i]==check[j]:\n ans[j]=1", "j", "range(len(check))", "range", "len(check)", "len", "check", "if s[i]==check[j]:\n ans[j]=1", "s[i]==check[j]", "s[i]", "s", "i", "check[j]", "check", "j", "ans[j]=1", "ans[j]", "ans", "j", "1", "if (ans[0]+ans[2])%2==0 and (ans[1]+ans[3])%2==0:\n print('Yes')\nelse:\n print('No')", "(ans[0]+ans[2])%2==0 and (ans[1]+ans[3])%2==0", "(ans[0]+ans[2])%2==0", "(ans[0]+ans[2])%2", "ans[0]+ans[2]", "ans[0]", "ans", "0", "ans[2]", "ans", "2", "2", "0", "(ans[1]+ans[3])%2==0", "(ans[1]+ans[3])%2", "ans[1]+ans[3]", "ans[1]", "ans", "1", "ans[3]", "ans", "3", "2", "0", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "ans=[0]*4", "[0]*4", "ans", "s=input()", "input()", "s", "check='NWSE'", "'NWSE'", "check" ]
s=input() ans=[0]*4 check='NWSE' for i in range(len(s)): for j in range(len(check)): if s[i]==check[j]: ans[j]=1 if (ans[0]+ans[2])%2==0 and (ans[1]+ans[3])%2==0: print('Yes') else: print('No')
[ 7, 15, 13, 0, 13, 18, 18, 13, 13, 13, 12, 13, 0, 13, 4, 18, 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, 14, 2, 13, 17, 4, 13, 10, 12, 13, 10, 18, 13 ]
[ [ 52, 4 ], [ 14, 13 ], [ 53, 17 ], [ 13, 25 ], [ 13, 28 ], [ 13, 32 ], [ 13, 35 ], [ 50, 47 ], [ 52, 53 ] ]
[ "import sys\n\ninput = sys.stdin.readline\n\ndef main():\n S = input().rstrip('\\n')\n if (('S' in S) == ('N' in S)) and (('E' in S) == ('W' in S)):\n print('Yes')\n else:\n print('No')\n\nif __name__ == '__main__':\n main()", "import sys", "sys", "input = sys.stdin.readline", "input", "sys.stdin.readline", "sys.stdin", "sys", "stdin", "readline", "def main():\n S = input().rstrip('\\n')\n if (('S' in S) == ('N' in S)) and (('E' in S) == ('W' in S)):\n print('Yes')\n else:\n print('No')", "main", "S = input().rstrip('\\n')", "S", "input().rstrip('\\n')", "().rstrip", "()", "input", "rstrip", "'\\n'", "if (('S' in S) == ('N' in S)) and (('E' in S) == ('W' in S)):\n print('Yes')\n else:\n print('No')", "(('S' in S) == ('N' in S)) and (('E' in S) == ('W' in S))", "('S' in S) == ('N' in S)", "'S' in S", "'S'", "S", "'N' in S", "'N'", "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'", "if __name__ == '__main__':\n main()", "__name__ == '__main__'", "__name__", "'__main__'", "main()", "main", "def main():\n S = input().rstrip('\\n')\n if (('S' in S) == ('N' in S)) and (('E' in S) == ('W' in S)):\n print('Yes')\n else:\n print('No')", "def main():\n S = input().rstrip('\\n')\n if (('S' in S) == ('N' in S)) and (('E' in S) == ('W' in S)):\n print('Yes')\n else:\n print('No')", "main", "input = sys.stdin.readline", "sys.stdin.readline", "input" ]
import sys input = sys.stdin.readline def main(): S = input().rstrip('\n') if (('S' in S) == ('N' in S)) and (('E' in S) == ('W' in S)): print('Yes') else: print('No') if __name__ == '__main__': main()
[ 7, 15, 13, 0, 13, 18, 18, 13, 13, 13, 12, 13, 0, 13, 17, 0, 13, 17, 0, 13, 4, 18, 4, 13, 13, 17, 14, 2, 2, 17, 13, 2, 17, 13, 0, 13, 17, 14, 2, 2, 17, 13, 2, 17, 13, 0, 13, 17, 14, 2, 2, 17, 13, 2, 17, 13, 0, 13, 17, 14, 2, 2, 17, 13, 2, 17, 13, 0, 13, 17, 14, 2, 13, 13, 4, 13, 17, 4, 13, 17, 14, 2, 13, 17, 4, 13, 10, 18, 13, 10, 12, 13 ]
[ [ 87, 4 ], [ 14, 13 ], [ 17, 16 ], [ 20, 19 ], [ 88, 23 ], [ 19, 30 ], [ 19, 33 ], [ 36, 35 ], [ 19, 41 ], [ 19, 44 ], [ 47, 46 ], [ 19, 52 ], [ 19, 55 ], [ 58, 57 ], [ 19, 63 ], [ 19, 66 ], [ 69, 68 ], [ 46, 72 ], [ 35, 72 ], [ 13, 72 ], [ 68, 73 ], [ 57, 73 ], [ 16, 73 ], [ 91, 85 ], [ 87, 88 ] ]
[ "import sys\n\ninput = sys.stdin.readline\n\ndef main():\n snflg = True\n ewflg = True\n S = input().rstrip('\\n')\n if 'S' in S or 'N' in S:\n snflg = False \n if 'S' in S and 'N' in S:\n snflg = 'Yes'\n if 'E' in S or 'W' in S:\n ewflg = False\n if 'E' in S and 'W' in S:\n ewflg = 'Yes'\n if snflg and ewflg:\n print('Yes')\n else:\n print('No')\n\nif __name__ == '__main__':\n main()", "import sys", "sys", "input = sys.stdin.readline", "input", "sys.stdin.readline", "sys.stdin", "sys", "stdin", "readline", "def main():\n snflg = True\n ewflg = True\n S = input().rstrip('\\n')\n if 'S' in S or 'N' in S:\n snflg = False \n if 'S' in S and 'N' in S:\n snflg = 'Yes'\n if 'E' in S or 'W' in S:\n ewflg = False\n if 'E' in S and 'W' in S:\n ewflg = 'Yes'\n if snflg and ewflg:\n print('Yes')\n else:\n print('No')", "main", "snflg = True", "snflg", "True", "ewflg = True", "ewflg", "True", "S = input().rstrip('\\n')", "S", "input().rstrip('\\n')", "().rstrip", "()", "input", "rstrip", "'\\n'", "if 'S' in S or 'N' in S:\n snflg = False \n if 'S' in S and 'N' in S:\n snflg = 'Yes'\n ", "'S' in S or 'N' in S", "'S' in S", "'S'", "S", "'N' in S", "'N'", "S", "snflg = False", "snflg", "False", "if 'S' in S and 'N' in S:\n snflg = 'Yes'\n ", "'S' in S and 'N' in S", "'S' in S", "'S'", "S", "'N' in S", "'N'", "S", "snflg = 'Yes'", "snflg", "'Yes'", "if 'E' in S or 'W' in S:\n ewflg = False\n if 'E' in S and 'W' in S:\n ewflg = 'Yes'\n ", "'E' in S or 'W' in S", "'E' in S", "'E'", "S", "'W' in S", "'W'", "S", "ewflg = False", "ewflg", "False", "if 'E' in S and 'W' in S:\n ewflg = 'Yes'\n ", "'E' in S and 'W' in S", "'E' in S", "'E'", "S", "'W' in S", "'W'", "S", "ewflg = 'Yes'", "ewflg", "'Yes'", "if snflg and ewflg:\n print('Yes')\n else:\n print('No')", "snflg and ewflg", "snflg", "ewflg", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "if __name__ == '__main__':\n main()", "__name__ == '__main__'", "__name__", "'__main__'", "main()", "main", "input = sys.stdin.readline", "sys.stdin.readline", "input", "def main():\n snflg = True\n ewflg = True\n S = input().rstrip('\\n')\n if 'S' in S or 'N' in S:\n snflg = False \n if 'S' in S and 'N' in S:\n snflg = 'Yes'\n if 'E' in S or 'W' in S:\n ewflg = False\n if 'E' in S and 'W' in S:\n ewflg = 'Yes'\n if snflg and ewflg:\n print('Yes')\n else:\n print('No')", "def main():\n snflg = True\n ewflg = True\n S = input().rstrip('\\n')\n if 'S' in S or 'N' in S:\n snflg = False \n if 'S' in S and 'N' in S:\n snflg = 'Yes'\n if 'E' in S or 'W' in S:\n ewflg = False\n if 'E' in S and 'W' in S:\n ewflg = 'Yes'\n if snflg and ewflg:\n print('Yes')\n else:\n print('No')", "main" ]
import sys input = sys.stdin.readline def main(): snflg = True ewflg = True S = input().rstrip('\n') if 'S' in S or 'N' in S: snflg = False if 'S' in S and 'N' in S: snflg = 'Yes' if 'E' in S or 'W' in S: ewflg = False if 'E' in S and 'W' in S: ewflg = 'Yes' if snflg and ewflg: print('Yes') else: print('No') if __name__ == '__main__': main()
[ 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, 0, 13, 17, 14, 2, 2, 2, 13, 17, 2, 13, 17, 2, 2, 13, 17, 2, 13, 17, 0, 13, 17, 14, 2, 2, 2, 13, 17, 2, 13, 17, 2, 2, 13, 17, 2, 13, 17, 0, 13, 17, 14, 2, 13, 13, 4, 13, 17, 4, 13, 17, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 100, 2 ], [ 103, 6 ], [ 101, 9 ], [ 94, 13 ], [ 101, 16 ], [ 106, 20 ], [ 101, 23 ], [ 97, 27 ], [ 101, 30 ], [ 88, 34 ], [ 112, 37 ], [ 104, 43 ], [ 95, 46 ], [ 104, 50 ], [ 95, 53 ], [ 109, 56 ], [ 107, 62 ], [ 98, 65 ], [ 107, 69 ], [ 98, 72 ], [ 91, 75 ], [ 110, 79 ], [ 89, 79 ], [ 92, 80 ], [ 113, 80 ], [ 88, 89 ], [ 91, 92 ], [ 94, 95 ], [ 97, 98 ], [ 100, 101 ], [ 103, 104 ], [ 106, 107 ], [ 109, 110 ], [ 112, 113 ] ]
[ "S = input()\ne = S.count(\"E\")\nw = S.count(\"W\")\nn = S.count(\"N\")\ns = S.count(\"S\")\n\new_flag = False\nns_flag = False\n\nif (e > 0 and w > 0) or (e == 0 and w == 0):\n ew_flag = True\nif (n > 0 and s > 0) or (n == 0 and s == 0):\n ns_flag = True\n\nif ew_flag and ns_flag:\n print(\"Yes\")\nelse:\n print(\"No\")", "S = input()", "S", "input()", "input", "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\"", "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\"", "ew_flag = False", "ew_flag", "False", "ns_flag = False", "ns_flag", "False", "if (e > 0 and w > 0) or (e == 0 and w == 0):\n ew_flag = True", "(e > 0 and w > 0) or (e == 0 and w == 0)", "e > 0 and w > 0", "e > 0", "e", "0", "w > 0", "w", "0", "e == 0 and w == 0", "e == 0", "e", "0", "w == 0", "w", "0", "ew_flag = True", "ew_flag", "True", "if (n > 0 and s > 0) or (n == 0 and s == 0):\n ns_flag = True", "(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", "ns_flag = True", "ns_flag", "True", "if ew_flag and ns_flag:\n print(\"Yes\")\nelse:\n print(\"No\")", "ew_flag and ns_flag", "ew_flag", "ns_flag", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "ew_flag = False", "False", "ew_flag", "ns_flag = True", "True", "ns_flag", "w = S.count(\"W\")", "S.count(\"W\")", "w", "s = S.count(\"S\")", "S.count(\"S\")", "s", "S = input()", "input()", "S", "e = S.count(\"E\")", "S.count(\"E\")", "e", "n = S.count(\"N\")", "S.count(\"N\")", "n", "ew_flag = True", "True", "ew_flag", "ns_flag = False", "False", "ns_flag" ]
S = input() e = S.count("E") w = S.count("W") n = S.count("N") s = S.count("S") ew_flag = False ns_flag = False if (e > 0 and w > 0) or (e == 0 and w == 0): ew_flag = True if (n > 0 and s > 0) or (n == 0 and s == 0): ns_flag = True if ew_flag and ns_flag: print("Yes") else: print("No")
[ 7, 15, 12, 13, 0, 13, 4, 13, 4, 13, 0, 13, 17, 14, 2, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 14, 2, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 0, 13, 17, 14, 2, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 14, 2, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 0, 13, 17, 4, 13, 13, 14, 2, 13, 17, 4, 13, 10, 12, 13 ]
[ [ 6, 5 ], [ 12, 11 ], [ 5, 17 ], [ 5, 22 ], [ 5, 29 ], [ 5, 34 ], [ 39, 38 ], [ 5, 44 ], [ 5, 49 ], [ 5, 56 ], [ 5, 61 ], [ 66, 65 ], [ 65, 69 ], [ 38, 69 ], [ 11, 69 ], [ 78, 75 ] ]
[ "from collections import Counter\ndef main():\n S = Counter(input())\n ans = \"Yes\"\n if S[\"N\"] > 0 or S[\"S\"] > 0:\n if S[\"N\"] == 0 or S[\"S\"] == 0:\n ans = \"No\"\n if S[\"W\"] > 0 or S[\"E\"] > 0:\n if S[\"W\"] == 0 or S[\"E\"] == 0:\n ans = \"No\"\n print(ans)\nif __name__ == '__main__':\n main()", "from collections import Counter", "def main():\n S = Counter(input())\n ans = \"Yes\"\n if S[\"N\"] > 0 or S[\"S\"] > 0:\n if S[\"N\"] == 0 or S[\"S\"] == 0:\n ans = \"No\"\n if S[\"W\"] > 0 or S[\"E\"] > 0:\n if S[\"W\"] == 0 or S[\"E\"] == 0:\n ans = \"No\"\n print(ans)", "main", "S = Counter(input())", "S", "Counter(input())", "Counter", "input()", "input", "ans = \"Yes\"", "ans", "\"Yes\"", "if S[\"N\"] > 0 or S[\"S\"] > 0:\n if S[\"N\"] == 0 or S[\"S\"] == 0:\n ans = \"No\"\n ", "S[\"N\"] > 0 or S[\"S\"] > 0", "S[\"N\"] > 0", "S[\"N\"]", "S", "\"N\"", "0", "S[\"S\"] > 0", "S[\"S\"]", "S", "\"S\"", "0", "if S[\"N\"] == 0 or S[\"S\"] == 0:\n ans = \"No\"\n ", "S[\"N\"] == 0 or S[\"S\"] == 0", "S[\"N\"] == 0", "S[\"N\"]", "S", "\"N\"", "0", "S[\"S\"] == 0", "S[\"S\"]", "S", "\"S\"", "0", "ans = \"No\"", "ans", "\"No\"", "if S[\"W\"] > 0 or S[\"E\"] > 0:\n if S[\"W\"] == 0 or S[\"E\"] == 0:\n ans = \"No\"\n ", "S[\"W\"] > 0 or S[\"E\"] > 0", "S[\"W\"] > 0", "S[\"W\"]", "S", "\"W\"", "0", "S[\"E\"] > 0", "S[\"E\"]", "S", "\"E\"", "0", "if S[\"W\"] == 0 or S[\"E\"] == 0:\n ans = \"No\"\n ", "S[\"W\"] == 0 or S[\"E\"] == 0", "S[\"W\"] == 0", "S[\"W\"]", "S", "\"W\"", "0", "S[\"E\"] == 0", "S[\"E\"]", "S", "\"E\"", "0", "ans = \"No\"", "ans", "\"No\"", "print(ans)", "print", "ans", "if __name__ == '__main__':\n main()", "__name__ == '__main__'", "__name__", "'__main__'", "main()", "main", "def main():\n S = Counter(input())\n ans = \"Yes\"\n if S[\"N\"] > 0 or S[\"S\"] > 0:\n if S[\"N\"] == 0 or S[\"S\"] == 0:\n ans = \"No\"\n if S[\"W\"] > 0 or S[\"E\"] > 0:\n if S[\"W\"] == 0 or S[\"E\"] == 0:\n ans = \"No\"\n print(ans)", "def main():\n S = Counter(input())\n ans = \"Yes\"\n if S[\"N\"] > 0 or S[\"S\"] > 0:\n if S[\"N\"] == 0 or S[\"S\"] == 0:\n ans = \"No\"\n if S[\"W\"] > 0 or S[\"E\"] > 0:\n if S[\"W\"] == 0 or S[\"E\"] == 0:\n ans = \"No\"\n print(ans)", "main" ]
from collections import Counter def main(): S = Counter(input()) ans = "Yes" if S["N"] > 0 or S["S"] > 0: if S["N"] == 0 or S["S"] == 0: ans = "No" if S["W"] > 0 or S["E"] > 0: if S["W"] == 0 or S["E"] == 0: ans = "No" print(ans) if __name__ == '__main__': main()
[ 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, 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, 4, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 84, 2 ], [ 72, 6 ], [ 85, 9 ], [ 78, 13 ], [ 85, 16 ], [ 75, 20 ], [ 85, 23 ], [ 81, 27 ], [ 85, 30 ], [ 73, 39 ], [ 79, 42 ], [ 73, 46 ], [ 79, 49 ], [ 76, 53 ], [ 82, 56 ], [ 76, 60 ], [ 82, 63 ], [ 72, 73 ], [ 75, 76 ], [ 78, 79 ], [ 81, 82 ], [ 84, 85 ] ]
[ "s = input()\nN = s.count('N')\nS = s.count('S')\nE = s.count('E')\nW = s.count('W')\nif ((N >= 1 and S == 0) or (N == 0 and S >= 1) or \n (E >= 1 and W == 0) or (E == 0 and W >= 1)):\n print('No')\nelse:\n print('Yes')", "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'", "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 >= 1 and S == 0) or (N == 0 and S >= 1) or \n (E >= 1 and W == 0) or (E == 0 and W >= 1)):\n print('No')\nelse:\n print('Yes')", "(N >= 1 and S == 0) or (N == 0 and S >= 1) or \n (E >= 1 and W == 0) or (E == 0 and W >= 1)", "(N >= 1 and S == 0) or (N == 0 and S >= 1) or \n (E >= 1 and W == 0)", "(N >= 1 and S == 0) or (N == 0 and S >= 1)", "N >= 1 and S == 0", "N >= 1", "N", "1", "S == 0", "S", "0", "N == 0 and S >= 1", "N == 0", "N", "0", "S >= 1", "S", "1", "E >= 1 and W == 0", "E >= 1", "E", "1", "W == 0", "W", "0", "E == 0 and W >= 1", "E == 0", "E", "0", "W >= 1", "W", "1", "print('No')", "print", "'No'", "print('Yes')", "print", "'Yes'", "N = s.count('N')", "s.count('N')", "N", "E = s.count('E')", "s.count('E')", "E", "S = s.count('S')", "s.count('S')", "S", "W = s.count('W')", "s.count('W')", "W", "s = input()", "input()", "s" ]
s = input() N = s.count('N') S = s.count('S') E = s.count('E') W = s.count('W') if ((N >= 1 and S == 0) or (N == 0 and S >= 1) or (E >= 1 and W == 0) or (E == 0 and W >= 1)): print('No') else: print('Yes')
[ 7, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 0, 13, 17, 0, 13, 17, 28, 13, 13, 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, 2, 2, 2, 2, 13, 13, 13, 13, 2, 2, 2, 13, 13, 40, 13, 40, 13, 2, 2, 2, 40, 13, 40, 13, 13, 13, 4, 13, 17, 4, 13, 17, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 95, 2 ], [ 89, 6 ], [ 98, 9 ], [ 107, 12 ], [ 101, 15 ], [ 19, 18 ], [ 96, 18 ], [ 18, 22 ], [ 83, 25 ], [ 18, 29 ], [ 86, 32 ], [ 18, 36 ], [ 104, 39 ], [ 18, 43 ], [ 92, 46 ], [ 84, 54 ], [ 90, 54 ], [ 105, 55 ], [ 108, 55 ], [ 87, 56 ], [ 99, 56 ], [ 93, 57 ], [ 102, 57 ], [ 84, 61 ], [ 90, 61 ], [ 105, 62 ], [ 108, 62 ], [ 87, 64 ], [ 99, 64 ], [ 93, 66 ], [ 102, 66 ], [ 84, 71 ], [ 90, 71 ], [ 105, 73 ], [ 108, 73 ], [ 87, 74 ], [ 99, 74 ], [ 93, 75 ], [ 102, 75 ], [ 83, 84 ], [ 86, 87 ], [ 89, 90 ], [ 92, 93 ], [ 95, 96 ], [ 98, 99 ], [ 101, 102 ], [ 104, 105 ], [ 107, 108 ] ]
[ "S = input()\nn = False\ne = False\ns = False\nw = False\nfor _s in S:\n if _s == 'N':\n n = True\n if _s == 'E':\n e = True\n if _s == 'S':\n s = True\n if _s == 'W':\n w = True\nif (n and s and e and w) or (n and s and not e and not w) or (not n and not s and e and w):\n print('Yes')\nelse:\n print('No')", "S = input()", "S", "input()", "input", "n = False", "n", "False", "e = False", "e", "False", "s = False", "s", "False", "w = False", "w", "False", "for _s in S:\n if _s == 'N':\n n = True\n if _s == 'E':\n e = True\n if _s == 'S':\n s = True\n if _s == 'W':\n w = True", "_s", "S", "if _s == 'N':\n n = True\n ", "_s == 'N'", "_s", "'N'", "n = True", "n", "True", "if _s == 'E':\n e = True\n ", "_s == 'E'", "_s", "'E'", "e = True", "e", "True", "if _s == 'S':\n s = True\n ", "_s == 'S'", "_s", "'S'", "s = True", "s", "True", "if _s == 'W':\n w = True", "_s == 'W'", "_s", "'W'", "w = True", "w", "True", "if (n and s and e and w) or (n and s and not e and not w) or (not n and not s and e and w):\n print('Yes')\nelse:\n print('No')", "(n and s and e and w) or (n and s and not e and not w) or (not n and not s and e and w)", "(n and s and e and w) or (n and s and not e and not w)", "n and s and e and w", "n and s and e", "n and s", "n", "s", "e", "w", "n and s and not e and not w", "n and s and not e", "n and s", "n", "s", "not e", "e", "not w", "w", "not n and not s and e and w", "not n and not s and e", "not n and not s", "not n", "n", "not s", "s", "e", "w", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "n = True", "True", "n", "e = True", "True", "e", "n = False", "False", "n", "w = True", "True", "w", "S = input()", "input()", "S", "e = False", "False", "e", "w = False", "False", "w", "s = True", "True", "s", "s = False", "False", "s" ]
S = input() n = False e = False s = False w = False for _s in S: if _s == 'N': n = True if _s == 'E': e = True if _s == 'S': s = True if _s == 'W': w = True if (n and s and e and w) or (n and s and not e and not w) or (not n and not s and e and w): print('Yes') else: print('No')
[ 7, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 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, 17, 13, 10, 17, 13, 10, 4, 13 ]
[ [ 58, 2 ], [ 52, 6 ], [ 55, 9 ], [ 59, 16 ], [ 59, 19 ], [ 59, 23 ], [ 59, 26 ], [ 59, 32 ], [ 59, 35 ], [ 59, 39 ], [ 59, 42 ], [ 52, 53 ], [ 55, 56 ], [ 58, 59 ] ]
[ "S=input()\nnsflag=False\nweflag=False\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", "nsflag=False", "nsflag", "False", "weflag=False", "weflag", "False", "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\"", "nsflag=False", "False", "nsflag", "weflag=False", "False", "weflag", "S=input()", "input()", "S" ]
S=input() nsflag=False weflag=False 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, 4, 13, 14, 2, 2, 2, 13, 17, 2, 13, 17, 2, 13, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13 ]
[ [ 26, 2 ], [ 27, 11 ], [ 27, 14 ], [ 27, 17 ], [ 26, 27 ] ]
[ "S = set(input())\nif S == {'W', 'E', 'N', 'S'} or S == {'W', 'E'} or S == {'N', 'S'}:\n print('Yes')\nelse:\n print('No')", "S = set(input())", "S", "set(input())", "set", "input()", "input", "if S == {'W', 'E', 'N', 'S'} or S == {'W', 'E'} or S == {'N', 'S'}:\n print('Yes')\nelse:\n print('No')", "S == {'W', 'E', 'N', 'S'} or S == {'W', 'E'} or S == {'N', 'S'}", "S == {'W', 'E', 'N', 'S'} or S == {'W', 'E'}", "S == {'W', 'E', 'N', 'S'}", "S", "{'W', 'E', 'N', 'S'}", "S == {'W', 'E'}", "S", "{'W', 'E'}", "S == {'N', 'S'}", "S", "{'N', 'S'}", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "S = set(input())", "set(input())", "S" ]
S = set(input()) if S == {'W', 'E', 'N', 'S'} or S == {'W', 'E'} or S == {'N', 'S'}: 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, 0, 13, 17, 0, 13, 17, 4, 13, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13 ]
[ [ 96, 2 ], [ 102, 6 ], [ 97, 9 ], [ 81, 13 ], [ 97, 16 ], [ 108, 20 ], [ 97, 23 ], [ 84, 27 ], [ 97, 30 ], [ 78, 34 ], [ 103, 38 ], [ 111, 41 ], [ 82, 45 ], [ 87, 48 ], [ 109, 52 ], [ 93, 55 ], [ 85, 59 ], [ 99, 62 ], [ 100, 66 ], [ 94, 66 ], [ 88, 66 ], [ 112, 66 ], [ 79, 66 ], [ 90, 69 ], [ 105, 72 ], [ 106, 76 ], [ 91, 76 ], [ 78, 79 ], [ 81, 82 ], [ 84, 85 ], [ 87, 88 ], [ 90, 91 ], [ 93, 94 ], [ 96, 97 ], [ 99, 100 ], [ 102, 103 ], [ 105, 106 ], [ 108, 109 ], [ 111, 112 ] ]
[ "S = input()\n\nn = S.count('N')\ns = S.count('S')\nw = S.count('W')\ne = S.count('E')\nd = 0\nif n > 0:\n d += 1\nif s > 0:\n d -= 1\nif w > 0:\n d += 2\nif e > 0:\n d -= 2\n \nif d == 0:\n ans = 'Yes'\nelse:\n ans = 'No'\n\nprint(ans)", "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'", "d = 0", "d", "0", "if n > 0:\n d += 1", "n > 0", "n", "0", "d += 1", "d", "1", "if s > 0:\n d -= 1", "s > 0", "s", "0", "d -= 1", "d", "1", "if w > 0:\n d += 2", "w > 0", "w", "0", "d += 2", "d", "2", "if e > 0:\n d -= 2\n ", "e > 0", "e", "0", "d -= 2", "d", "2", "if d == 0:\n ans = 'Yes'\nelse:\n ans = 'No'", "d == 0", "d", "0", "ans = 'Yes'", "ans", "'Yes'", "ans = 'No'", "ans", "'No'", "print(ans)", "print", "ans", "d = 0", "0", "d", "s = S.count('S')", "S.count('S')", "s", "e = S.count('E')", "S.count('E')", "e", "d -= 1", "1", "d", "ans = 'Yes'", "'Yes'", "ans", "d += 2", "2", "d", "S = input()", "input()", "S", "d -= 2", "2", "d", "n = S.count('N')", "S.count('N')", "n", "ans = 'No'", "'No'", "ans", "w = S.count('W')", "S.count('W')", "w", "d += 1", "1", "d" ]
S = input() n = S.count('N') s = S.count('S') w = S.count('W') e = S.count('E') d = 0 if n > 0: d += 1 if s > 0: d -= 1 if w > 0: d += 2 if e > 0: d -= 2 if d == 0: ans = 'Yes' else: ans = 'No' print(ans)
[ 7, 0, 13, 4, 13, 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, 0, 18, 13, 17, 17, 14, 2, 2, 2, 18, 13, 17, 18, 13, 17, 2, 18, 13, 17, 18, 13, 17, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 39, 13 ]
[ [ 82, 2 ], [ 85, 6 ], [ 14, 13 ], [ 83, 18 ], [ 83, 22 ], [ 13, 23 ], [ 29, 26 ], [ 86, 27 ], [ 83, 33 ], [ 13, 34 ], [ 40, 37 ], [ 86, 38 ], [ 83, 44 ], [ 13, 45 ], [ 51, 48 ], [ 86, 49 ], [ 56, 53 ], [ 86, 54 ], [ 86, 62 ], [ 86, 65 ], [ 86, 69 ], [ 86, 72 ], [ 82, 83 ], [ 85, 86 ] ]
[ "S = input()\nA = [0, 0, 0, 0]\nfor i in range(len(S)):\n if S[i] == \"N\":\n A[0] = 1\n elif S[i] == \"S\":\n A[1] = 1\n elif S[i] == \"E\":\n A[2] = 1\n else:\n A[3] = 1\nif A[0] ^ A[1] == A[2] ^ A[3] == 0:\n print(\"Yes\")\nelse:\n print(\"No\")", "S = input()", "S", "input()", "input", "A = [0, 0, 0, 0]", "A", "[0, 0, 0, 0]", "0", "0", "0", "0", "for i in range(len(S)):\n if S[i] == \"N\":\n A[0] = 1\n elif S[i] == \"S\":\n A[1] = 1\n elif S[i] == \"E\":\n A[2] = 1\n else:\n A[3] = 1", "i", "range(len(S))", "range", "len(S)", "len", "S", "if S[i] == \"N\":\n A[0] = 1\n elif S[i] == \"S\":\n A[1] = 1\n elif S[i] == \"E\":\n A[2] = 1\n else:\n A[3] = 1", "S[i] == \"N\"", "S[i]", "S", "i", "\"N\"", "A[0] = 1", "A[0]", "A", "0", "1", "elif S[i] == \"S\":\n A[1] = 1\n ", "S[i] == \"S\"", "S[i]", "S", "i", "\"S\"", "A[1] = 1", "A[1]", "A", "1", "1", "elif S[i] == \"E\":\n A[2] = 1\n ", "S[i] == \"E\"", "S[i]", "S", "i", "\"E\"", "A[2] = 1", "A[2]", "A", "2", "1", "A[3] = 1", "A[3]", "A", "3", "1", "if A[0] ^ A[1] == A[2] ^ A[3] == 0:\n print(\"Yes\")\nelse:\n print(\"No\")", "A[0] ^ A[1] == A[2] ^ A[3] == 0", "A[0] ^ A[1] == A[2] ^ A[3]", "A[0] ^ A[1]", "A[0]", "A", "0", "A[1]", "A", "1", "A[2] ^ A[3]", "A[2]", "A", "2", "A[3]", "A", "3", "0", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "S = input()", "input()", "S", "A = [0, 0, 0, 0]", "[0, 0, 0, 0]", "A" ]
S = input() A = [0, 0, 0, 0] for i in range(len(S)): if S[i] == "N": A[0] = 1 elif S[i] == "S": A[1] = 1 elif S[i] == "E": A[2] = 1 else: A[3] = 1 if A[0] ^ A[1] == A[2] ^ A[3] == 0: print("Yes") else: print("No")
[ 7, 0, 13, 4, 13, 4, 13, 4, 13, 14, 2, 2, 4, 13, 13, 17, 2, 2, 17, 13, 2, 17, 13, 4, 13, 17, 14, 2, 2, 4, 13, 13, 17, 2, 2, 17, 13, 2, 17, 13, 4, 13, 17, 14, 2, 4, 13, 13, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13 ]
[ [ 56, 2 ], [ 57, 14 ], [ 57, 19 ], [ 57, 22 ], [ 57, 31 ], [ 57, 36 ], [ 57, 39 ], [ 57, 47 ], [ 56, 57 ] ]
[ "A = set(list(input()))\nif len(A) == 2 and(\"S\" in A and \"N\" in A ):\n print(\"Yes\")\nelif len(A) == 2 and (\"W\" in A and \"E\" in A):\n print(\"Yes\")\nelif len(A) == 4:\n print(\"Yes\")\nelse:\n print(\"No\")", "A = set(list(input()))", "A", "set(list(input()))", "set", "list(input())", "list", "input()", "input", "if len(A) == 2 and(\"S\" in A and \"N\" in A ):\n print(\"Yes\")\nelif len(A) == 2 and (\"W\" in A and \"E\" in A):\n print(\"Yes\")\nelif len(A) == 4:\n print(\"Yes\")\nelse:\n print(\"No\")", "len(A) == 2 and(\"S\" in A and \"N\" in A )", "len(A) == 2", "len(A)", "len", "A", "2", "\"S\" in A and \"N\" in A", "\"S\" in A", "\"S\"", "A", "\"N\" in A", "\"N\"", "A", "print(\"Yes\")", "print", "\"Yes\"", "elif len(A) == 2 and (\"W\" in A and \"E\" in A):\n print(\"Yes\")", "len(A) == 2 and (\"W\" in A and \"E\" in A)", "len(A) == 2", "len(A)", "len", "A", "2", "\"W\" in A and \"E\" in A", "\"W\" in A", "\"W\"", "A", "\"E\" in A", "\"E\"", "A", "print(\"Yes\")", "print", "\"Yes\"", "elif len(A) == 4:\n print(\"Yes\")", "len(A) == 4", "len(A)", "len", "A", "4", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "A = set(list(input()))", "set(list(input()))", "A" ]
A = set(list(input())) if len(A) == 2 and("S" in A and "N" in A ): print("Yes") elif len(A) == 2 and ("W" in A and "E" in A): print("Yes") elif len(A) == 4: print("Yes") else: print("No")
[ 7, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 13, 13, 14, 2, 17, 13, 14, 2, 17, 13, 14, 2, 17, 13, 14, 2, 17, 13, 8, 2, 2, 13, 13, 2, 13, 13, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 44, 2 ], [ 56, 6 ], [ 56, 9 ], [ 56, 11 ], [ 56, 12 ], [ 45, 16 ], [ 45, 20 ], [ 45, 24 ], [ 45, 28 ], [ 51, 32 ], [ 57, 33 ], [ 54, 35 ], [ 48, 36 ], [ 44, 45 ], [ 56, 48 ], [ 56, 51 ], [ 56, 54 ], [ 56, 57 ] ]
[ "s = input(); a = b = c = d = 0\nif \"N\" in s: a = 1\nif \"W\" in s: b = 1\nif \"S\" in s: c = 1\nif \"E\" in s: d = 1\nprint(\"Yes\") if a == c and b == d else print(\"No\")", "s = input()", "s", "input()", "input", "a = b = c = d = 0", "a", "0", "= b = c = d = 0", "b", "0", "c", "d", "if \"N\" in s: a = 1", "\"N\" in s", "\"N\"", "s", "if \"W\" in s: b = 1", "\"W\" in s", "\"W\"", "s", "if \"S\" in s: c = 1", "\"S\" in s", "\"S\"", "s", "if \"E\" in s: d = 1", "\"E\" in s", "\"E\"", "s", "print(\"Yes\") if a == c and b == d else print(\"No\")", "a == c and b == d", "a == c", "a", "c", "b == d", "b", "d", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "s = input()", "input()", "s", "d = 0", "0", "d", "a = b = c = d = 0", "0", "a", "b = c = d = 0", "0", "b", "c = d = 0", "0", "c" ]
s = input(); a = b = c = d = 0 if "N" in s: a = 1 if "W" in s: b = 1 if "S" in s: c = 1 if "E" in s: d = 1 print("Yes") if a == c and b == d else print("No")
[ 7, 15, 13, 12, 13, 12, 13, 0, 13, 4, 13, 4, 13, 0, 13, 17, 14, 2, 2, 2, 13, 4, 13, 17, 2, 13, 4, 13, 17, 2, 13, 4, 13, 17, 0, 13, 17, 4, 13, 13, 4, 13, 10, 12, 13, 10, 12, 13 ]
[ [ 9, 8 ], [ 47, 12 ], [ 15, 14 ], [ 8, 20 ], [ 8, 25 ], [ 8, 30 ], [ 36, 35 ], [ 35, 39 ], [ 14, 39 ], [ 44, 41 ] ]
[ "import sys\ndef input(): return sys.stdin.readline().strip()\n\ndef resolve():\n s=set(input())\n ans='No'\n if s==set('NSWE') or s==set('NS') or s==set('WE'):\n ans='Yes'\n print(ans)\nresolve()", "import sys", "sys", "def input(): return sys.stdin.readline().strip()", "input", "def resolve():\n s=set(input())\n ans='No'\n if s==set('NSWE') or s==set('NS') or s==set('WE'):\n ans='Yes'\n print(ans)", "resolve", "s=set(input())", "s", "set(input())", "set", "input()", "input", "ans='No'", "ans", "'No'", "if s==set('NSWE') or s==set('NS') or s==set('WE'):\n ans='Yes'\n ", "s==set('NSWE') or s==set('NS') or s==set('WE')", "s==set('NSWE') or s==set('NS')", "s==set('NSWE')", "s", "set('NSWE')", "set", "'NSWE'", "s==set('NS')", "s", "set('NS')", "set", "'NS'", "s==set('WE')", "s", "set('WE')", "set", "'WE'", "ans='Yes'", "ans", "'Yes'", "print(ans)", "print", "ans", "resolve()", "resolve", "def resolve():\n s=set(input())\n ans='No'\n if s==set('NSWE') or s==set('NS') or s==set('WE'):\n ans='Yes'\n print(ans)", "def resolve():\n s=set(input())\n ans='No'\n if s==set('NSWE') or s==set('NS') or s==set('WE'):\n ans='Yes'\n print(ans)", "resolve", "def input(): return sys.stdin.readline().strip()", "def input(): return sys.stdin.readline().strip()", "input" ]
import sys def input(): return sys.stdin.readline().strip() def resolve(): s=set(input()) ans='No' if s==set('NSWE') or s==set('NS') or s==set('WE'): ans='Yes' print(ans) resolve()
[ 7, 0, 13, 4, 13, 41, 28, 13, 39, 17, 17, 17, 17, 4, 13, 17, 0, 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, 4, 13, 17, 10, 4, 13, 10, 13, 13 ]
[ [ 50, 2 ], [ 8, 7 ], [ 7, 14 ], [ 53, 17 ], [ 21, 20 ], [ 51, 20 ], [ 26, 23 ], [ 54, 24 ], [ 20, 25 ], [ 54, 31 ], [ 54, 34 ], [ 54, 38 ], [ 54, 41 ], [ 50, 51 ], [ 53, 54 ] ]
[ "S=input()\n\nD={s:False for s in [\"N\",\"W\",\"S\",\"E\"]}\n\nfor s in S:\n D[s]=True\n\nif (D[\"N\"]==D[\"S\"]) and (D[\"W\"]==D[\"E\"]):\n print(\"Yes\")\nelse:\n print(\"No\")", "S=input()", "S", "input()", "input", "s:False for s in [\"N\",\"W\",\"S\",\"E\"]", "for s in [\"N\",\"W\",\"S\",\"E\"]", "s", "[\"N\",\"W\",\"S\",\"E\"]", "\"N\"", "\"W\"", "\"S\"", "\"E\"", "for s in [\"N\",\"W\",\"S\",\"E\"]", "s", "False", "D={s:False for s in [\"N\",\"W\",\"S\",\"E\"]}", "D", "{s:False for s in [\"N\",\"W\",\"S\",\"E\"]}", "for s in S:\n D[s]=True", "s", "S", "D[s]=True", "D[s]", "D", "s", "True", "if (D[\"N\"]==D[\"S\"]) and (D[\"W\"]==D[\"E\"]):\n print(\"Yes\")\nelse:\n print(\"No\")", "(D[\"N\"]==D[\"S\"]) and (D[\"W\"]==D[\"E\"])", "D[\"N\"]==D[\"S\"]", "D[\"N\"]", "D", "\"N\"", "D[\"S\"]", "D", "\"S\"", "D[\"W\"]==D[\"E\"]", "D[\"W\"]", "D", "\"W\"", "D[\"E\"]", "D", "\"E\"", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "S=input()", "input()", "S", "D={s:False for s in [\"N\",\"W\",\"S\",\"E\"]}", "{s:False for s in [\"N\",\"W\",\"S\",\"E\"]}", "D" ]
S=input() D={s:False for s in ["N","W","S","E"]} for s in S: D[s]=True if (D["N"]==D["S"]) and (D["W"]==D["E"]): 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, 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, 2, 4, 18, 13, 13, 17, 17, 2, 4, 18, 13, 13, 17, 17, 40, 4, 18, 13, 13, 17, 17, 4, 13, 17, 14, 2, 2, 2, 2, 4, 18, 13, 13, 17, 17, 40, 4, 18, 13, 13, 17, 17, 40, 4, 18, 13, 13, 17, 17, 2, 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()\nif S.count(\"S\") >= 1 and S.count(\"W\") >= 1 and S.count(\"E\") >= 1 and S.count(\"N\") >= 1:\n print(\"Yes\")\nelif S.count(\"S\") >= 1 and S.count(\"W\") == 0 and S.count(\"E\") == 0 and S.count(\"N\") >= 1:\n print(\"Yes\")\nelif S.count(\"S\") == 0 and S.count(\"W\") >= 1 and S.count(\"E\") >= 1 and S.count(\"N\") == 0:\n print(\"Yes\")\nelse:\n print(\"No\")", "S = input()", "S", "input()", "input", "if S.count(\"S\") >= 1 and S.count(\"W\") >= 1 and S.count(\"E\") >= 1 and S.count(\"N\") >= 1:\n print(\"Yes\")\nelif S.count(\"S\") >= 1 and S.count(\"W\") == 0 and S.count(\"E\") == 0 and S.count(\"N\") >= 1:\n print(\"Yes\")\nelif S.count(\"S\") == 0 and S.count(\"W\") >= 1 and S.count(\"E\") >= 1 and S.count(\"N\") == 0:\n print(\"Yes\")\nelse:\n print(\"No\")", "S.count(\"S\") >= 1 and S.count(\"W\") >= 1 and S.count(\"E\") >= 1 and S.count(\"N\") >= 1", "S.count(\"S\") >= 1 and S.count(\"W\") >= 1 and S.count(\"E\") >= 1", "S.count(\"S\") >= 1 and S.count(\"W\") >= 1", "S.count(\"S\") >= 1", "S.count(\"S\")", "S.count", "S", "count", "\"S\"", "1", "S.count(\"W\") >= 1", "S.count(\"W\")", "S.count", "S", "count", "\"W\"", "1", "S.count(\"E\") >= 1", "S.count(\"E\")", "S.count", "S", "count", "\"E\"", "1", "S.count(\"N\") >= 1", "S.count(\"N\")", "S.count", "S", "count", "\"N\"", "1", "print(\"Yes\")", "print", "\"Yes\"", "elif S.count(\"S\") >= 1 and S.count(\"W\") == 0 and S.count(\"E\") == 0 and S.count(\"N\") >= 1:\n print(\"Yes\")", "S.count(\"S\") >= 1 and S.count(\"W\") == 0 and S.count(\"E\") == 0 and S.count(\"N\") >= 1", "S.count(\"S\") >= 1 and S.count(\"W\") == 0 and S.count(\"E\") == 0", "S.count(\"S\") >= 1 and S.count(\"W\") == 0", "S.count(\"S\") >= 1", "S.count(\"S\")", "S.count", "S", "count", "\"S\"", "1", "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(\"N\") >= 1", "S.count(\"N\")", "S.count", "S", "count", "\"N\"", "1", "print(\"Yes\")", "print", "\"Yes\"", "elif S.count(\"S\") == 0 and S.count(\"W\") >= 1 and S.count(\"E\") >= 1 and S.count(\"N\") == 0:\n print(\"Yes\")", "S.count(\"S\") == 0 and S.count(\"W\") >= 1 and S.count(\"E\") >= 1 and S.count(\"N\") == 0", "S.count(\"S\") == 0 and S.count(\"W\") >= 1 and S.count(\"E\") >= 1", "S.count(\"S\") == 0 and S.count(\"W\") >= 1", "S.count(\"S\") == 0", "S.count(\"S\")", "S.count", "S", "count", "\"S\"", "0", "S.count(\"W\") >= 1", "S.count(\"W\")", "S.count", "S", "count", "\"W\"", "1", "S.count(\"E\") >= 1", "S.count(\"E\")", "S.count", "S", "count", "\"E\"", "1", "S.count(\"N\") == 0", "S.count(\"N\")", "S.count", "S", "count", "\"N\"", "0", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "S = input()", "input()", "S" ]
S = input() if S.count("S") >= 1 and S.count("W") >= 1 and S.count("E") >= 1 and S.count("N") >= 1: print("Yes") elif S.count("S") >= 1 and S.count("W") == 0 and S.count("E") == 0 and S.count("N") >= 1: print("Yes") elif S.count("S") == 0 and S.count("W") >= 1 and S.count("E") >= 1 and S.count("N") == 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, 2, 13, 10, 4, 13 ]
[ [ 52, 2 ], [ 43, 6 ], [ 53, 9 ], [ 46, 11 ], [ 53, 14 ], [ 49, 16 ], [ 53, 19 ], [ 40, 21 ], [ 53, 24 ], [ 44, 28 ], [ 50, 29 ], [ 47, 31 ], [ 41, 32 ], [ 40, 41 ], [ 43, 44 ], [ 46, 47 ], [ 49, 50 ], [ 52, 53 ] ]
[ "S=input()\nsn = \"N\" in S\nse = \"E\" in S\nss = \"S\" in S\nsw = \"W\" in S\nif (sn==ss) and (se==sw):\n print(\"Yes\")\nelse:\n print(\"No\")", "S=input()", "S", "input()", "input", "sn = \"N\" in S", "sn", "\"N\" in S", "\"N\"", "S", "se = \"E\" in S", "se", "\"E\" in S", "\"E\"", "S", "ss = \"S\" in S", "ss", "\"S\" in S", "\"S\"", "S", "sw = \"W\" in S", "sw", "\"W\" in S", "\"W\"", "S", "if (sn==ss) and (se==sw):\n print(\"Yes\")\nelse:\n print(\"No\")", "(sn==ss) and (se==sw)", "sn==ss", "sn", "ss", "se==sw", "se", "sw", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "sw = \"W\" in S", "\"W\" in S", "sw", "sn = \"N\" in S", "\"N\" in S", "sn", "se = \"E\" in S", "\"E\" in S", "se", "ss = \"S\" in S", "\"S\" in S", "ss", "S=input()", "input()", "S" ]
S=input() sn = "N" in S se = "E" in S ss = "S" in S sw = "W" in S if (sn==ss) and (se==sw): print("Yes") else: print("No")
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 14, 2, 2, 13, 17, 2, 13, 17, 4, 13, 17, 14, 2, 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, 4, 13, 17, 10, 4, 13, 10, 4, 13 ]
[ [ 61, 2 ], [ 58, 8 ], [ 62, 13 ], [ 59, 17 ], [ 59, 20 ], [ 59, 27 ], [ 62, 36 ], [ 62, 39 ], [ 62, 47 ], [ 62, 50 ], [ 58, 59 ], [ 61, 62 ] ]
[ "s=list(input())\nss=len(set(s))\nif ss==1 or ss==3:\n print('No')\nelif ss==4:\n print('Yes')\nelse:\n if 'N' in s and 'S' in s:\n print('Yes')\n elif 'W' in s and 'E' in s:\n print('Yes')\n else:\n print('No')", "s=list(input())", "s", "list(input())", "list", "input()", "input", "ss=len(set(s))", "ss", "len(set(s))", "len", "set(s)", "set", "s", "if ss==1 or ss==3:\n print('No')\nelif ss==4:\n print('Yes')\nelse:\n if 'N' in s and 'S' in s:\n print('Yes')\n elif 'W' in s and 'E' in s:\n print('Yes')\n else:\n print('No')", "ss==1 or ss==3", "ss==1", "ss", "1", "ss==3", "ss", "3", "print('No')", "print", "'No'", "elif ss==4:\n print('Yes')", "ss==4", "ss", "4", "print('Yes')", "print", "'Yes'", "if 'N' in s and 'S' in s:\n print('Yes')\n elif 'W' in s and 'E' in s:\n print('Yes')\n else:\n print('No')", "'N' in s and 'S' in s", "'N' in s", "'N'", "s", "'S' in s", "'S'", "s", "print('Yes')", "print", "'Yes'", "elif 'W' in s and 'E' in s:\n print('Yes')\n ", "'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'", "ss=len(set(s))", "len(set(s))", "ss", "s=list(input())", "list(input())", "s" ]
s=list(input()) ss=len(set(s)) if ss==1 or ss==3: print('No') elif ss==4: print('Yes') else: if 'N' in s and 'S' in s: print('Yes') elif 'W' in s and 'E' in s: print('Yes') else: print('No')
[ 7, 15, 13, 4, 18, 13, 13, 2, 17, 17, 0, 13, 18, 18, 13, 13, 13, 12, 13, 0, 13, 4, 18, 4, 13, 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, 40, 13, 17, 2, 40, 13, 17, 2, 13, 17, 2, 40, 13, 17, 2, 13, 17, 2, 2, 13, 17, 40, 13, 17, 4, 13, 17, 4, 13, 17, 14, 2, 13, 17, 4, 13, 10, 18, 13, 10, 12, 13 ]
[ [ 99, 11 ], [ 21, 20 ], [ 100, 24 ], [ 28, 27 ], [ 20, 30 ], [ 35, 34 ], [ 20, 37 ], [ 42, 41 ], [ 20, 44 ], [ 49, 48 ], [ 20, 51 ], [ 27, 60 ], [ 34, 63 ], [ 27, 67 ], [ 34, 70 ], [ 41, 74 ], [ 48, 77 ], [ 41, 81 ], [ 48, 84 ], [ 103, 97 ], [ 99, 100 ] ]
[ "import sys\n\nsys.setrecursionlimit(10 ** 8)\n\ninput = sys.stdin.readline\n\n\ndef main():\n S = input().strip()\n\n n = S.count(\"N\")\n s = S.count(\"S\")\n w = S.count(\"W\")\n e = S.count(\"E\")\n\n if (n == 0 and s != 0) or (n != 0 and s == 0) or (w != 0 and e == 0) or (w == 0 and e != 0):\n print(\"No\")\n else:\n print(\"Yes\")\n\n\n \n \n \n \n\nif __name__ == '__main__':\n main()\n", "import sys", "sys", "sys.setrecursionlimit(10 ** 8)", "sys.setrecursionlimit", "sys", "setrecursionlimit", "10 ** 8", "10", "8", "input = sys.stdin.readline", "input", "sys.stdin.readline", "sys.stdin", "sys", "stdin", "readline", "def main():\n S = input().strip()\n\n n = S.count(\"N\")\n s = S.count(\"S\")\n w = S.count(\"W\")\n e = S.count(\"E\")\n\n if (n == 0 and s != 0) or (n != 0 and s == 0) or (w != 0 and e == 0) or (w == 0 and e != 0):\n print(\"No\")\n else:\n print(\"Yes\")\n\n\n \n \n \n ", "main", "S = input().strip()", "S", "input().strip()", "().strip", "()", "input", "strip", "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 and s != 0) or (n != 0 and s == 0) or (w != 0 and e == 0) or (w == 0 and e != 0):\n print(\"No\")\n else:\n print(\"Yes\")\n\n\n \n \n \n ", "(n == 0 and s != 0) or (n != 0 and s == 0) or (w != 0 and e == 0) or (w == 0 and e != 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", "w == 0 and e != 0", "w == 0", "w", "0", "e != 0", "e", "0", "print(\"No\")", "print", "\"No\"", "print(\"Yes\")", "print", "\"Yes\"", "if __name__ == '__main__':\n main()", "__name__ == '__main__'", "__name__", "'__main__'", "main()", "main", "input = sys.stdin.readline", "sys.stdin.readline", "input", "def main():\n S = input().strip()\n\n n = S.count(\"N\")\n s = S.count(\"S\")\n w = S.count(\"W\")\n e = S.count(\"E\")\n\n if (n == 0 and s != 0) or (n != 0 and s == 0) or (w != 0 and e == 0) or (w == 0 and e != 0):\n print(\"No\")\n else:\n print(\"Yes\")\n\n\n \n \n \n ", "def main():\n S = input().strip()\n\n n = S.count(\"N\")\n s = S.count(\"S\")\n w = S.count(\"W\")\n e = S.count(\"E\")\n\n if (n == 0 and s != 0) or (n != 0 and s == 0) or (w != 0 and e == 0) or (w == 0 and e != 0):\n print(\"No\")\n else:\n print(\"Yes\")\n\n\n \n \n \n ", "main" ]
import sys sys.setrecursionlimit(10 ** 8) input = sys.stdin.readline def main(): S = input().strip() n = S.count("N") s = S.count("S") w = S.count("W") e = S.count("E") if (n == 0 and s != 0) or (n != 0 and s == 0) or (w != 0 and e == 0) or (w == 0 and e != 0): print("No") else: print("Yes") if __name__ == '__main__': main()
[ 7, 0, 13, 4, 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, 17, 13, 40, 17, 13, 4, 13, 17, 14, 2, 2, 2, 40, 17, 13, 40, 17, 13, 2, 17, 13, 2, 17, 13, 4, 13, 17, 4, 13, 17, 10, 4, 13 ]
[ [ 68, 2 ], [ 69, 13 ], [ 69, 16 ], [ 69, 19 ], [ 69, 22 ], [ 69, 32 ], [ 69, 35 ], [ 69, 38 ], [ 69, 41 ], [ 69, 51 ], [ 69, 54 ], [ 69, 57 ], [ 69, 60 ], [ 68, 69 ] ]
[ "S = list(input())\nif 'N' in S and 'W' in S and 'S' in S and 'E' in S:\n print('Yes')\nelif 'N' in S and 'S' in S and 'W' not in S and 'E' not in S:\n print('Yes')\nelif 'N' not in S and 'S' not in S and 'W' in S and 'E' in S:\n print('Yes')\nelse:\n print('No')", "S = list(input())", "S", "list(input())", "list", "input()", "input", "if 'N' in S and 'W' in S and 'S' in S and 'E' in S:\n print('Yes')\nelif 'N' in S and 'S' in S and 'W' not in S and 'E' not in S:\n print('Yes')\nelif 'N' not in S and 'S' not in S and 'W' in S and 'E' in S:\n print('Yes')\nelse:\n print('No')", "'N' in S and 'W' in S and 'S' in S and 'E' in S", "'N' in S and 'W' in S and 'S' in S", "'N' in S and 'W' in S", "'N' in S", "'N'", "S", "'W' in S", "'W'", "S", "'S' in S", "'S'", "S", "'E' in S", "'E'", "S", "print('Yes')", "print", "'Yes'", "elif 'N' in S and 'S' in S and 'W' not in S and 'E' not in S:\n print('Yes')", "'N' in S and 'S' in S and 'W' not in S and 'E' not in S", "'N' in S and 'S' in S and 'W' not in S", "'N' in S and 'S' in S", "'N' in S", "'N'", "S", "'S' in S", "'S'", "S", "'W' not in S", "'W'", "S", "'E' not in S", "'E'", "S", "print('Yes')", "print", "'Yes'", "elif 'N' not in S and 'S' not in S and 'W' in S and 'E' in S:\n print('Yes')", "'N' not in S and 'S' not in S and 'W' in S and 'E' in S", "'N' not in S and 'S' not in S and 'W' in S", "'N' not in S and 'S' not in S", "'N' not in S", "'N'", "S", "'S' not in S", "'S'", "S", "'W' in S", "'W'", "S", "'E' in S", "'E'", "S", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "S = list(input())", "list(input())", "S" ]
S = list(input()) if 'N' in S and 'W' in S and 'S' in S and 'E' in S: print('Yes') elif 'N' in S and 'S' in S and 'W' not in S and 'E' not in S: print('Yes') elif 'N' not in S and 'S' not 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, 13, 17, 13, 17, 13, 17, 14, 2, 17, 13, 0, 13, 17, 14, 2, 17, 13, 0, 13, 17, 14, 2, 17, 13, 0, 13, 17, 14, 2, 17, 13, 0, 13, 17, 14, 2, 2, 2, 4, 13, 2, 13, 13, 17, 17, 2, 2, 4, 13, 2, 13, 13, 17, 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, 17, 13, 10, 4, 13, 10, 17, 13 ]
[ [ 92, 2 ], [ 74, 8 ], [ 83, 10 ], [ 89, 12 ], [ 77, 14 ], [ 93, 19 ], [ 95, 21 ], [ 93, 26 ], [ 71, 28 ], [ 93, 33 ], [ 80, 35 ], [ 93, 40 ], [ 86, 42 ], [ 96, 51 ], [ 75, 51 ], [ 72, 52 ], [ 84, 52 ], [ 81, 60 ], [ 90, 60 ], [ 87, 61 ], [ 78, 61 ], [ 71, 72 ], [ 74, 75 ], [ 77, 78 ], [ 80, 81 ], [ 83, 84 ], [ 86, 87 ], [ 89, 90 ], [ 92, 93 ], [ 95, 96 ] ]
[ "s = list(input())\n\nk, m, n, h = 0, 0, 0, 0\n\nif 'N' in s:\n k = 1\nif 'S' in s:\n m = 1\nif 'W' in s:\n n = 1\nif 'E' in s:\n h = 1\n\nif (abs(k-m))%2 == 0 and (abs(n-h))%2 == 0:\n print('Yes')\nelse:\n print('No')", "s = list(input())", "s", "list(input())", "list", "input()", "input", "k, m, n, h = 0, 0, 0, 0", "k", "0", "m", "0", "n", "0", "h", "0", "if 'N' in s:\n k = 1", "'N' in s", "'N'", "s", "k = 1", "k", "1", "if 'S' in s:\n m = 1", "'S' in s", "'S'", "s", "m = 1", "m", "1", "if 'W' in s:\n n = 1", "'W' in s", "'W'", "s", "n = 1", "n", "1", "if 'E' in s:\n h = 1", "'E' in s", "'E'", "s", "h = 1", "h", "1", "if (abs(k-m))%2 == 0 and (abs(n-h))%2 == 0:\n print('Yes')\nelse:\n print('No')", "(abs(k-m))%2 == 0 and (abs(n-h))%2 == 0", "(abs(k-m))%2 == 0", "(abs(k-m))%2", "abs(k-m)", "abs", "k-m", "k", "m", "2", "0", "(abs(n-h))%2 == 0", "(abs(n-h))%2", "abs(n-h)", "abs", "n-h", "n", "h", "2", "0", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "m = 1", "1", "m", "k, m, n, h = 0, 0, 0, 0", "0", "k", "h = 0, 0, 0, 0", "0", "h", "n = 1", "1", "n", "m, n, h = 0, 0, 0, 0", "0", "m", "h = 1", "1", "h", "n, h = 0, 0, 0, 0", "0", "n", "s = list(input())", "list(input())", "s", "k = 1", "1", "k" ]
s = list(input()) k, m, n, h = 0, 0, 0, 0 if 'N' in s: k = 1 if 'S' in s: m = 1 if 'W' in s: n = 1 if 'E' in s: h = 1 if (abs(k-m))%2 == 0 and (abs(n-h))%2 == 0: print('Yes') else: print('No')
[ 7, 0, 13, 4, 13, 4, 13, 4, 13, 4, 13, 14, 2, 2, 4, 13, 13, 17, 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, 4, 13, 17, 10, 4, 13 ]
[ [ 48, 2 ], [ 49, 16 ], [ 49, 26 ], [ 49, 29 ], [ 49, 37 ], [ 49, 40 ], [ 48, 49 ] ]
[ "s = list(set(list(input())))\n\nif (len(s)%2==1):\n print(\"No\")\nelse:\n if (\"N\" in s) and (\"S\" in s):\n print(\"Yes\")\n elif (\"E\" in s) and (\"W\" in s):\n print(\"Yes\")\n else:\n print(\"No\")", "s = list(set(list(input())))", "s", "list(set(list(input())))", "list", "set(list(input()))", "set", "list(input())", "list", "input()", "input", "if (len(s)%2==1):\n print(\"No\")\nelse:\n if (\"N\" in s) and (\"S\" in s):\n print(\"Yes\")\n elif (\"E\" in s) and (\"W\" in s):\n print(\"Yes\")\n else:\n print(\"No\")", "len(s)%2==1", "len(s)%2", "len(s)", "len", "s", "2", "1", "print(\"No\")", "print", "\"No\"", "if (\"N\" in s) and (\"S\" in s):\n print(\"Yes\")\n elif (\"E\" in s) and (\"W\" in s):\n print(\"Yes\")\n else:\n print(\"No\")", "(\"N\" in s) and (\"S\" in s)", "\"N\" in s", "\"N\"", "s", "\"S\" in s", "\"S\"", "s", "print(\"Yes\")", "print", "\"Yes\"", "elif (\"E\" in s) and (\"W\" in s):\n print(\"Yes\")\n ", "(\"E\" in s) and (\"W\" in s)", "\"E\" in s", "\"E\"", "s", "\"W\" in s", "\"W\"", "s", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "s = list(set(list(input())))", "list(set(list(input())))", "s" ]
s = list(set(list(input()))) if (len(s)%2==1): print("No") else: if ("N" in s) and ("S" in s): print("Yes") elif ("E" in s) and ("W" in s): print("Yes") else: print("No")
[ 7, 0, 13, 4, 13, 0, 13, 17, 14, 2, 2, 2, 4, 18, 13, 13, 17, 4, 18, 13, 13, 17, 17, 40, 2, 4, 18, 13, 13, 17, 4, 18, 13, 13, 17, 17, 0, 13, 17, 14, 2, 2, 2, 4, 18, 13, 13, 17, 4, 18, 13, 13, 17, 17, 40, 2, 4, 18, 13, 13, 17, 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 ]
[ [ 79, 2 ], [ 85, 6 ], [ 80, 14 ], [ 80, 19 ], [ 80, 27 ], [ 80, 32 ], [ 82, 37 ], [ 80, 45 ], [ 80, 50 ], [ 80, 58 ], [ 80, 63 ], [ 88, 68 ], [ 79, 80 ], [ 82, 83 ], [ 85, 86 ], [ 88, 89 ] ]
[ "s=input()\nok = True\n\nif s.count('N')*s.count('S')==0 and s.count('N')+s.count('S')!=0:\n ok=False\nif s.count('W')*s.count('E')==0 and s.count('W')+s.count('E')!=0:\n ok=False\n \nif ok:\n print('Yes')\nelse:\n print('No')", "s=input()", "s", "input()", "input", "ok = True", "ok", "True", "if s.count('N')*s.count('S')==0 and s.count('N')+s.count('S')!=0:\n ok=False", "s.count('N')*s.count('S')==0 and s.count('N')+s.count('S')!=0", "s.count('N')*s.count('S')==0", "s.count('N')*s.count('S')", "s.count('N')", "s.count", "s", "count", "'N'", "s.count('S')", "s.count", "s", "count", "'S'", "0", "s.count('N')+s.count('S')!=0", "s.count('N')+s.count('S')", "s.count('N')", "s.count", "s", "count", "'N'", "s.count('S')", "s.count", "s", "count", "'S'", "0", "ok=False", "ok", "False", "if s.count('W')*s.count('E')==0 and s.count('W')+s.count('E')!=0:\n ok=False\n ", "s.count('W')*s.count('E')==0 and s.count('W')+s.count('E')!=0", "s.count('W')*s.count('E')==0", "s.count('W')*s.count('E')", "s.count('W')", "s.count", "s", "count", "'W'", "s.count('E')", "s.count", "s", "count", "'E'", "0", "s.count('W')+s.count('E')!=0", "s.count('W')+s.count('E')", "s.count('W')", "s.count", "s", "count", "'W'", "s.count('E')", "s.count", "s", "count", "'E'", "0", "ok=False", "ok", "False", "if ok:\n print('Yes')\nelse:\n print('No')", "ok", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "s=input()", "input()", "s", "ok=False", "False", "ok", "ok = True", "True", "ok", "ok=False", "False", "ok" ]
s=input() ok = True if s.count('N')*s.count('S')==0 and s.count('N')+s.count('S')!=0: ok=False if s.count('W')*s.count('E')==0 and s.count('W')+s.count('E')!=0: ok=False if ok: print('Yes') else: print('No')
[ 7, 12, 13, 0, 13, 4, 13, 0, 13, 21, 22, 17, 17, 22, 17, 17, 22, 17, 17, 22, 17, 17, 0, 13, 17, 28, 13, 13, 0, 18, 13, 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, 13, 14, 2, 13, 17, 4, 13, 10, 12, 13 ]
[ [ 5, 4 ], [ 9, 8 ], [ 24, 23 ], [ 27, 26 ], [ 4, 26 ], [ 32, 29 ], [ 8, 30 ], [ 26, 31 ], [ 8, 38 ], [ 8, 43 ], [ 8, 49 ], [ 8, 54 ], [ 8, 62 ], [ 8, 67 ], [ 8, 73 ], [ 8, 78 ], [ 83, 82 ], [ 82, 86 ], [ 23, 86 ], [ 95, 92 ] ]
[ "# coding: utf-8\n\ndef main():\n S = input()\n dic = {'N':0, 'S':0, 'E':0, 'W':0}\n ans = 'No'\n\n for s in S:\n dic[s] += 1\n\n if (dic['N'] == 0 and dic['S'] == 0) or (dic['N'] > 0 and dic['S'] > 0):\n if (dic['E'] == 0 and dic['W'] == 0) or (dic['E'] > 0 and dic['W'] > 0):\n ans = 'Yes'\n\n print(ans)\n\nif __name__ == \"__main__\":\n main()", "def main():\n S = input()\n dic = {'N':0, 'S':0, 'E':0, 'W':0}\n ans = 'No'\n\n for s in S:\n dic[s] += 1\n\n if (dic['N'] == 0 and dic['S'] == 0) or (dic['N'] > 0 and dic['S'] > 0):\n if (dic['E'] == 0 and dic['W'] == 0) or (dic['E'] > 0 and dic['W'] > 0):\n ans = 'Yes'\n\n print(ans)", "main", "S = input()", "S", "input()", "input", "dic = {'N':0, 'S':0, 'E':0, 'W':0}", "dic", "{'N':0, 'S':0, 'E':0, 'W':0}", "'N'", "'N'", "0", "'S'", "'S'", "0", "'E'", "'E'", "0", "'W'", "'W'", "0", "ans = 'No'", "ans", "'No'", "for s in S:\n dic[s] += 1\n\n ", "s", "S", "dic[s] += 1", "dic[s]", "dic", "s", "1", "if (dic['N'] == 0 and dic['S'] == 0) or (dic['N'] > 0 and dic['S'] > 0):\n if (dic['E'] == 0 and dic['W'] == 0) or (dic['E'] > 0 and dic['W'] > 0):\n ans = 'Yes'\n\n ", "(dic['N'] == 0 and dic['S'] == 0) or (dic['N'] > 0 and dic['S'] > 0)", "dic['N'] == 0 and dic['S'] == 0", "dic['N'] == 0", "dic['N']", "dic", "'N'", "0", "dic['S'] == 0", "dic['S']", "dic", "'S'", "0", "dic['N'] > 0 and dic['S'] > 0", "dic['N'] > 0", "dic['N']", "dic", "'N'", "0", "dic['S'] > 0", "dic['S']", "dic", "'S'", "0", "if (dic['E'] == 0 and dic['W'] == 0) or (dic['E'] > 0 and dic['W'] > 0):\n ans = 'Yes'\n\n ", "(dic['E'] == 0 and dic['W'] == 0) or (dic['E'] > 0 and dic['W'] > 0)", "dic['E'] == 0 and dic['W'] == 0", "dic['E'] == 0", "dic['E']", "dic", "'E'", "0", "dic['W'] == 0", "dic['W']", "dic", "'W'", "0", "dic['E'] > 0 and dic['W'] > 0", "dic['E'] > 0", "dic['E']", "dic", "'E'", "0", "dic['W'] > 0", "dic['W']", "dic", "'W'", "0", "ans = 'Yes'", "ans", "'Yes'", "print(ans)", "print", "ans", "if __name__ == \"__main__\":\n main()", "__name__ == \"__main__\"", "__name__", "\"__main__\"", "main()", "main", "def main():\n S = input()\n dic = {'N':0, 'S':0, 'E':0, 'W':0}\n ans = 'No'\n\n for s in S:\n dic[s] += 1\n\n if (dic['N'] == 0 and dic['S'] == 0) or (dic['N'] > 0 and dic['S'] > 0):\n if (dic['E'] == 0 and dic['W'] == 0) or (dic['E'] > 0 and dic['W'] > 0):\n ans = 'Yes'\n\n print(ans)", "def main():\n S = input()\n dic = {'N':0, 'S':0, 'E':0, 'W':0}\n ans = 'No'\n\n for s in S:\n dic[s] += 1\n\n if (dic['N'] == 0 and dic['S'] == 0) or (dic['N'] > 0 and dic['S'] > 0):\n if (dic['E'] == 0 and dic['W'] == 0) or (dic['E'] > 0 and dic['W'] > 0):\n ans = 'Yes'\n\n print(ans)", "main" ]
# coding: utf-8 def main(): S = input() dic = {'N':0, 'S':0, 'E':0, 'W':0} ans = 'No' for s in S: dic[s] += 1 if (dic['N'] == 0 and dic['S'] == 0) or (dic['N'] > 0 and dic['S'] > 0): if (dic['E'] == 0 and dic['W'] == 0) or (dic['E'] > 0 and dic['W'] > 0): ans = 'Yes' print(ans) if __name__ == "__main__": main()
[ 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, 0, 13, 8, 4, 13, 39, 2, 13, 13, 2, 13, 13, 17, 17, 4, 13, 13, 10, 2, 13, 10, 2, 13, 10, 2, 13, 10, 8, 13, 10, 2, 13, 10, 4, 13 ]
[ [ 58, 2 ], [ 43, 6 ], [ 59, 9 ], [ 55, 11 ], [ 59, 14 ], [ 49, 16 ], [ 59, 19 ], [ 46, 21 ], [ 59, 24 ], [ 52, 26 ], [ 44, 32 ], [ 56, 33 ], [ 50, 35 ], [ 47, 36 ], [ 53, 41 ], [ 43, 44 ], [ 46, 47 ], [ 49, 50 ], [ 52, 53 ], [ 55, 56 ], [ 58, 59 ] ]
[ "s = input()\n\na = 'N' in s\nb = 'S' in s\nc = 'E' in s\nd = 'W' in s\n\nans = 'Yes' if all([a == b, c == d]) else 'No'\nprint(ans)", "s = input()", "s", "input()", "input", "a = 'N' in s", "a", "'N' in s", "'N'", "s", "b = 'S' in s", "b", "'S' in s", "'S'", "s", "c = 'E' in s", "c", "'E' in s", "'E'", "s", "d = 'W' in s", "d", "'W' in s", "'W'", "s", "ans = 'Yes' if all([a == b, c == d]) else 'No'", "ans", "'Yes' if all([a == b, c == d]) else 'No'", "all([a == b, c == d])", "all", "[a == b, c == d]", "a == b", "a", "b", "c == d", "c", "d", "'Yes'", "'No'", "print(ans)", "print", "ans", "a = 'N' in s", "'N' in s", "a", "d = 'W' in s", "'W' in s", "d", "c = 'E' in s", "'E' in s", "c", "ans = 'Yes' if all([a == b, c == d]) else 'No'", "'Yes' if all([a == b, c == d]) else 'No'", "ans", "b = 'S' in s", "'S' in s", "b", "s = input()", "input()", "s" ]
s = input() a = 'N' in s b = 'S' in s c = 'E' in s d = 'W' in s ans = 'Yes' if all([a == b, c == d]) else 'No' print(ans)
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 2, 17, 13, 0, 13, 4, 13, 2, 17, 13, 0, 13, 4, 13, 2, 17, 13, 0, 13, 4, 13, 2, 17, 13, 14, 2, 2, 2, 13, 13, 17, 2, 2, 13, 13, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 61, 2 ], [ 52, 6 ], [ 62, 11 ], [ 55, 13 ], [ 62, 18 ], [ 58, 20 ], [ 62, 25 ], [ 64, 27 ], [ 62, 32 ], [ 53, 37 ], [ 56, 38 ], [ 59, 42 ], [ 65, 43 ], [ 52, 53 ], [ 55, 56 ], [ 58, 59 ], [ 61, 62 ], [ 64, 65 ] ]
[ "S = input()\nn = int('N' in S)\ns = int('S' in S)\nw = int('W' in S)\ne = int('E' in S)\n\nif n + s == 1 or w + e == 1:\n print('No')\nelse:\n print('Yes')", "S = input()", "S", "input()", "input", "n = int('N' in S)", "n", "int('N' in S)", "int", "'N' in S", "'N'", "S", "s = int('S' in S)", "s", "int('S' in S)", "int", "'S' in S", "'S'", "S", "w = int('W' in S)", "w", "int('W' in S)", "int", "'W' in S", "'W'", "S", "e = int('E' in S)", "e", "int('E' in S)", "int", "'E' in S", "'E'", "S", "if n + s == 1 or w + e == 1:\n print('No')\nelse:\n print('Yes')", "n + s == 1 or w + e == 1", "n + s == 1", "n + s", "n", "s", "1", "w + e == 1", "w + e", "w", "e", "1", "print('No')", "print", "'No'", "print('Yes')", "print", "'Yes'", "n = int('N' in S)", "int('N' in S)", "n", "s = int('S' in S)", "int('S' in S)", "s", "w = int('W' in S)", "int('W' in S)", "w", "S = input()", "input()", "S", "e = int('E' in S)", "int('E' in S)", "e" ]
S = input() n = int('N' in S) s = int('S' in S) w = int('W' in S) e = int('E' in S) if n + s == 1 or w + e == 1: print('No') else: print('Yes')
[ 7, 0, 13, 4, 13, 0, 13, 17, 14, 2, 17, 13, 14, 40, 17, 13, 14, 2, 17, 13, 14, 40, 17, 13, 14, 2, 17, 13, 14, 40, 17, 13, 14, 2, 17, 13, 14, 40, 17, 13, 4, 13, 13, 10, 4, 13, 10, 17, 13 ]
[ [ 44, 2 ], [ 47, 6 ], [ 45, 11 ], [ 45, 15 ], [ 45, 19 ], [ 45, 23 ], [ 45, 27 ], [ 45, 31 ], [ 45, 35 ], [ 45, 39 ], [ 48, 42 ], [ 44, 45 ], [ 47, 48 ] ]
[ "s = input()\nans = \"Yes\"\n\nif \"N\" in s:\n if \"S\" not in s: ans = \"No\" \nif \"S\" in s:\n if \"N\" not in s: ans = \"No\"\nif \"W\" in s:\n if \"E\" not in s: ans = \"No\"\nif \"E\" in s:\n if \"W\" not in s: ans = \"No\"\n\nprint(ans)", "s = input()", "s", "input()", "input", "ans = \"Yes\"", "ans", "\"Yes\"", "if \"N\" in s:\n if \"S\" not in s: ans = \"No\" ", "\"N\" in s", "\"N\"", "s", "if \"S\" not in s: ans = \"", "\"S\" not in s", "\"S\"", "s", "if \"S\" in s:\n if \"N\" not in s: ans = \"No\"", "\"S\" in s", "\"S\"", "s", "if \"N\" not in s: ans = ", "\"N\" not in s", "\"N\"", "s", "if \"W\" in s:\n if \"E\" not in s: ans = \"No\"", "\"W\" in s", "\"W\"", "s", "if \"E\" not in s: ans = ", "\"E\" not in s", "\"E\"", "s", "if \"E\" in s:\n if \"W\" not in s: ans = \"No\"", "\"E\" in s", "\"E\"", "s", "if \"W\" not in s: ans = ", "\"W\" not in s", "\"W\"", "s", "print(ans)", "print", "ans", "s = input()", "input()", "s", "ans = \"Yes\"", "\"Yes\"", "ans" ]
s = input() ans = "Yes" if "N" in s: if "S" not in s: ans = "No" if "S" in s: if "N" not in s: ans = "No" if "W" in s: if "E" not in s: ans = "No" if "E" in s: if "W" not in s: ans = "No" print(ans)
[ 7, 0, 13, 4, 13, 0, 13, 17, 14, 2, 2, 17, 13, 2, 17, 13, 0, 13, 17, 14, 2, 2, 17, 13, 2, 17, 13, 0, 13, 17, 14, 2, 13, 17, 4, 13, 17, 4, 13, 17, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13 ]
[ [ 50, 2 ], [ 44, 6 ], [ 51, 12 ], [ 51, 15 ], [ 47, 17 ], [ 51, 23 ], [ 51, 26 ], [ 41, 28 ], [ 42, 32 ], [ 48, 32 ], [ 45, 32 ], [ 41, 42 ], [ 44, 45 ], [ 47, 48 ], [ 50, 51 ] ]
[ "s = input()\nflag = True\nif (\"N\" in s) ^ (\"S\" in s):\n flag = False\nif (\"W\" in s) ^ (\"E\" in s):\n flag = False\nif flag == True:\n print(\"Yes\")\nelse:\n print(\"No\")", "s = input()", "s", "input()", "input", "flag = True", "flag", "True", "if (\"N\" in s) ^ (\"S\" in s):\n flag = False", "(\"N\" in s) ^ (\"S\" in s)", "\"N\" in s", "\"N\"", "s", "\"S\" in s", "\"S\"", "s", "flag = False", "flag", "False", "if (\"W\" in s) ^ (\"E\" in s):\n flag = False", "(\"W\" in s) ^ (\"E\" in s)", "\"W\" in s", "\"W\"", "s", "\"E\" in s", "\"E\"", "s", "flag = False", "flag", "False", "if flag == True:\n print(\"Yes\")\nelse:\n print(\"No\")", "flag == True", "flag", "True", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "flag = False", "False", "flag", "flag = True", "True", "flag", "flag = False", "False", "flag", "s = input()", "input()", "s" ]
s = input() flag = True if ("N" in s) ^ ("S" in s): flag = False if ("W" in s) ^ ("E" in s): flag = False if flag == True: print("Yes") else: print("No")
[ 7, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 14, 2, 2, 2, 2, 17, 13, 2, 17, 13, 40, 17, 13, 40, 17, 13, 4, 13, 17, 14, 2, 2, 2, 40, 17, 13, 40, 17, 13, 2, 17, 13, 2, 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, 17, 13, 10, 17, 13 ]
[ [ 72, 2 ], [ 75, 6 ], [ 78, 9 ], [ 73, 17 ], [ 73, 20 ], [ 73, 23 ], [ 73, 26 ], [ 73, 36 ], [ 73, 39 ], [ 73, 42 ], [ 73, 45 ], [ 73, 55 ], [ 73, 58 ], [ 73, 61 ], [ 73, 64 ], [ 72, 73 ], [ 75, 76 ], [ 78, 79 ] ]
[ "s = input()\nt = 0\nu = 0\nif \"N\" in s and \"S\" in s and \"E\" not in s and \"W\" not in s:\n print(\"Yes\")\nelif \"N\" not in s and \"S\" not in s and \"E\" in s and \"W\" in s:\n print(\"Yes\")\nelif \"N\" in s and \"S\" in s and \"E\" in s and \"W\" in s:\n print(\"Yes\")\nelse:\n print(\"No\")", "s = input()", "s", "input()", "input", "t = 0", "t", "0", "u = 0", "u", "0", "if \"N\" in s and \"S\" in s and \"E\" not in s and \"W\" not in s:\n print(\"Yes\")\nelif \"N\" not in s and \"S\" not in s and \"E\" in s and \"W\" in s:\n print(\"Yes\")\nelif \"N\" in s and \"S\" in s and \"E\" in s and \"W\" in s:\n print(\"Yes\")\nelse:\n print(\"No\")", "\"N\" in s and \"S\" in s and \"E\" not in s and \"W\" not in s", "\"N\" in s and \"S\" in s and \"E\" not in s", "\"N\" in s and \"S\" in s", "\"N\" in s", "\"N\"", "s", "\"S\" in s", "\"S\"", "s", "\"E\" not in s", "\"E\"", "s", "\"W\" not in s", "\"W\"", "s", "print(\"Yes\")", "print", "\"Yes\"", "elif \"N\" not in s and \"S\" not in s and \"E\" in s and \"W\" in s:\n print(\"Yes\")", "\"N\" not in s and \"S\" not in s and \"E\" in s and \"W\" in s", "\"N\" not in s and \"S\" not in s and \"E\" in 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", "\"E\"", "s", "\"W\" in s", "\"W\"", "s", "print(\"Yes\")", "print", "\"Yes\"", "elif \"N\" in s and \"S\" in s and \"E\" in s and \"W\" in s:\n print(\"Yes\")", "\"N\" in s and \"S\" in s and \"E\" in s and \"W\" in s", "\"N\" in s and \"S\" in s and \"E\" in s", "\"N\" in s and \"S\" in s", "\"N\" in s", "\"N\"", "s", "\"S\" in s", "\"S\"", "s", "\"E\" in s", "\"E\"", "s", "\"W\" in s", "\"W\"", "s", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "s = input()", "input()", "s", "t = 0", "0", "t", "u = 0", "0", "u" ]
s = input() t = 0 u = 0 if "N" in s and "S" in s and "E" not in s and "W" not in s: print("Yes") elif "N" not in s and "S" not in s and "E" in s and "W" in s: print("Yes") elif "N" in s and "S" in s and "E" in s and "W" in s: print("Yes") else: print("No")
[ 7, 0, 13, 4, 13, 4, 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 ]
[ [ 65, 2 ], [ 66, 12 ], [ 66, 16 ], [ 66, 25 ], [ 66, 29 ], [ 66, 38 ], [ 66, 42 ], [ 66, 51 ], [ 66, 55 ], [ 65, 66 ] ]
[ "U=list(str(input()))\nif \"N\" in U:\n if \"S\" not in U:\n print(\"No\")\n exit()\nif \"S\" in U:\n if \"N\" not in U:\n print(\"No\")\n exit()\nif \"E\" in U:\n if \"W\" not in U:\n print(\"No\")\n exit()\nif \"W\" in U:\n if \"E\" not in U:\n print(\"No\")\n exit()\nprint(\"Yes\")", "U=list(str(input()))", "U", "list(str(input()))", "list", "str(input())", "str", "input()", "input", "if \"N\" in U:\n if \"S\" not in U:\n print(\"No\")\n exit()", "\"N\" in U", "\"N\"", "U", "if \"S\" not in U:\n print(\"No\")\n exit()", "\"S\" not in U", "\"S\"", "U", "print(\"No\")", "print", "\"No\"", "exit()", "exit", "if \"S\" in U:\n if \"N\" not in U:\n print(\"No\")\n exit()", "\"S\" in U", "\"S\"", "U", "if \"N\" not in U:\n print(\"No\")\n exit()", "\"N\" not in U", "\"N\"", "U", "print(\"No\")", "print", "\"No\"", "exit()", "exit", "if \"E\" in U:\n if \"W\" not in U:\n print(\"No\")\n exit()", "\"E\" in U", "\"E\"", "U", "if \"W\" not in U:\n print(\"No\")\n exit()", "\"W\" not in U", "\"W\"", "U", "print(\"No\")", "print", "\"No\"", "exit()", "exit", "if \"W\" in U:\n if \"E\" not in U:\n print(\"No\")\n exit()", "\"W\" in U", "\"W\"", "U", "if \"E\" not in U:\n print(\"No\")\n exit()", "\"E\" not in U", "\"E\"", "U", "print(\"No\")", "print", "\"No\"", "exit()", "exit", "print(\"Yes\")", "print", "\"Yes\"", "U=list(str(input()))", "list(str(input()))", "U" ]
U=list(str(input())) if "N" in U: if "S" not in U: print("No") exit() if "S" in U: if "N" not in U: print("No") exit() if "E" in U: if "W" not in U: print("No") exit() if "W" in U: if "E" not in U: print("No") exit() print("Yes")
[ 7, 0, 13, 4, 13, 4, 13, 4, 13, 4, 13, 4, 18, 13, 13, 0, 13, 17, 14, 2, 18, 13, 17, 17, 14, 2, 18, 13, 17, 17, 14, 2, 2, 4, 13, 13, 17, 2, 4, 13, 13, 17, 0, 13, 17, 14, 2, 18, 13, 17, 17, 14, 2, 18, 13, 17, 17, 0, 13, 17, 4, 13, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13 ]
[ [ 73, 2 ], [ 74, 13 ], [ 70, 16 ], [ 74, 21 ], [ 74, 27 ], [ 74, 35 ], [ 74, 40 ], [ 67, 43 ], [ 74, 48 ], [ 74, 54 ], [ 64, 58 ], [ 65, 62 ], [ 68, 62 ], [ 71, 62 ], [ 64, 65 ], [ 67, 68 ], [ 70, 71 ], [ 73, 74 ] ]
[ "S = list(set(list(input())))\nS.sort()\nans = \"No\"\nif S[0] == 'E':\n if S[-1] == 'W':\n if len(S)==2 or len(S)==4:\n ans = \"Yes\"\nif S[0] == 'N':\n if S[-1] == 'S':\n ans = \"Yes\"\nprint(ans)", "S = list(set(list(input())))", "S", "list(set(list(input())))", "list", "set(list(input()))", "set", "list(input())", "list", "input()", "input", "S.sort()", "S.sort", "S", "sort", "ans = \"No\"", "ans", "\"No\"", "if S[0] == 'E':\n if S[-1] == 'W':\n if len(S)==2 or len(S)==4:\n ans = \"Yes\"", "S[0] == 'E'", "S[0]", "S", "0", "'E'", "if S[-1] == 'W':\n if len(S)==2 or len(S)==4:\n ans = \"Yes\"", "S[-1] == 'W'", "S[-1]", "S", "-1", "'W'", "if len(S)==2 or len(S)==4:\n ans = \"Yes\"", "len(S)==2 or len(S)==4", "len(S)==2", "len(S)", "len", "S", "2", "len(S)==4", "len(S)", "len", "S", "4", "ans = \"Yes\"", "ans", "\"Yes\"", "if S[0] == 'N':\n if S[-1] == 'S':\n ans = \"Yes\"", "S[0] == 'N'", "S[0]", "S", "0", "'N'", "if S[-1] == 'S':\n ans = \"Yes\"", "S[-1] == 'S'", "S[-1]", "S", "-1", "'S'", "ans = \"Yes\"", "ans", "\"Yes\"", "print(ans)", "print", "ans", "ans = \"Yes\"", "\"Yes\"", "ans", "ans = \"Yes\"", "\"Yes\"", "ans", "ans = \"No\"", "\"No\"", "ans", "S = list(set(list(input())))", "list(set(list(input())))", "S" ]
S = list(set(list(input()))) S.sort() ans = "No" if S[0] == 'E': if S[-1] == 'W': if len(S)==2 or len(S)==4: ans = "Yes" if S[0] == 'N': if S[-1] == 'S': ans = "Yes" print(ans)
[ 7, 0, 13, 4, 13, 0, 13, 39, 17, 17, 17, 17, 0, 13, 39, 28, 13, 13, 4, 18, 13, 13, 4, 18, 13, 13, 13, 14, 2, 2, 40, 18, 13, 17, 17, 40, 18, 13, 17, 17, 2, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 14, 2, 2, 40, 18, 13, 17, 17, 40, 18, 13, 17, 17, 2, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 4, 13, 17, 4, 13, 17, 14, 2, 2, 40, 18, 13, 17, 17, 40, 18, 13, 17, 17, 2, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 14, 2, 2, 40, 18, 13, 17, 17, 40, 18, 13, 17, 17, 2, 2, 18, 13, 17, 17, 2, 18, 13, 17, 17, 4, 13, 17, 4, 13, 17, 4, 13, 17, 10, 39, 13, 10, 39, 13, 10, 4, 13 ]
[ [ 145, 2 ], [ 139, 6 ], [ 142, 13 ], [ 17, 16 ], [ 140, 16 ], [ 143, 20 ], [ 146, 24 ], [ 16, 26 ], [ 143, 32 ], [ 143, 37 ], [ 143, 43 ], [ 143, 48 ], [ 143, 56 ], [ 143, 61 ], [ 143, 67 ], [ 143, 72 ], [ 143, 86 ], [ 143, 91 ], [ 143, 97 ], [ 143, 102 ], [ 143, 110 ], [ 143, 115 ], [ 143, 121 ], [ 143, 126 ], [ 139, 140 ], [ 142, 143 ], [ 145, 146 ] ]
[ "s = input()\np = ['N', 'S', 'E', 'W']\ncnt = []\nfor i in p:\n cnt.append(s.count(i))\nif cnt[0] != 0 and cnt[1] != 0 or cnt[0] == 0 and cnt[1] == 0:\n if cnt[2] != 0 and cnt[3] != 0 or cnt[2] == 0 and cnt[3] == 0:\n print(\"Yes\")\n else:\n print(\"No\")\nelif cnt[2] != 0 and cnt[3] != 0 or cnt[2] == 0 and cnt[3] == 0:\n if cnt[0] != 0 and cnt[1] != 0 or cnt[0] == 0 and cnt[1] == 0:\n print(\"Yes\")\n else:\n print(\"No\")\nelse:\n print(\"No\")", "s = input()", "s", "input()", "input", "p = ['N', 'S', 'E', 'W']", "p", "['N', 'S', 'E', 'W']", "'N'", "'S'", "'E'", "'W'", "cnt = []", "cnt", "[]", "for i in p:\n cnt.append(s.count(i))", "i", "p", "cnt.append(s.count(i))", "cnt.append", "cnt", "append", "s.count(i)", "s.count", "s", "count", "i", "if cnt[0] != 0 and cnt[1] != 0 or cnt[0] == 0 and cnt[1] == 0:\n if cnt[2] != 0 and cnt[3] != 0 or cnt[2] == 0 and cnt[3] == 0:\n print(\"Yes\")\n else:\n print(\"No\")\nelif cnt[2] != 0 and cnt[3] != 0 or cnt[2] == 0 and cnt[3] == 0:\n if cnt[0] != 0 and cnt[1] != 0 or cnt[0] == 0 and cnt[1] == 0:\n print(\"Yes\")\n else:\n print(\"No\")\nelse:\n print(\"No\")", "cnt[0] != 0 and cnt[1] != 0 or cnt[0] == 0 and cnt[1] == 0", "cnt[0] != 0 and cnt[1] != 0", "cnt[0] != 0", "cnt[0]", "cnt", "0", "0", "cnt[1] != 0", "cnt[1]", "cnt", "1", "0", "cnt[0] == 0 and cnt[1] == 0", "cnt[0] == 0", "cnt[0]", "cnt", "0", "0", "cnt[1] == 0", "cnt[1]", "cnt", "1", "0", "if cnt[2] != 0 and cnt[3] != 0 or cnt[2] == 0 and cnt[3] == 0:\n print(\"Yes\")\n else:\n print(\"No\")", "cnt[2] != 0 and cnt[3] != 0 or cnt[2] == 0 and cnt[3] == 0", "cnt[2] != 0 and cnt[3] != 0", "cnt[2] != 0", "cnt[2]", "cnt", "2", "0", "cnt[3] != 0", "cnt[3]", "cnt", "3", "0", "cnt[2] == 0 and cnt[3] == 0", "cnt[2] == 0", "cnt[2]", "cnt", "2", "0", "cnt[3] == 0", "cnt[3]", "cnt", "3", "0", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "elif cnt[2] != 0 and cnt[3] != 0 or cnt[2] == 0 and cnt[3] == 0:\n if cnt[0] != 0 and cnt[1] != 0 or cnt[0] == 0 and cnt[1] == 0:\n print(\"Yes\")\n else:\n print(\"No\")", "cnt[2] != 0 and cnt[3] != 0 or cnt[2] == 0 and cnt[3] == 0", "cnt[2] != 0 and cnt[3] != 0", "cnt[2] != 0", "cnt[2]", "cnt", "2", "0", "cnt[3] != 0", "cnt[3]", "cnt", "3", "0", "cnt[2] == 0 and cnt[3] == 0", "cnt[2] == 0", "cnt[2]", "cnt", "2", "0", "cnt[3] == 0", "cnt[3]", "cnt", "3", "0", "if cnt[0] != 0 and cnt[1] != 0 or cnt[0] == 0 and cnt[1] == 0:\n print(\"Yes\")\n else:\n print(\"No\")", "cnt[0] != 0 and cnt[1] != 0 or cnt[0] == 0 and cnt[1] == 0", "cnt[0] != 0 and cnt[1] != 0", "cnt[0] != 0", "cnt[0]", "cnt", "0", "0", "cnt[1] != 0", "cnt[1]", "cnt", "1", "0", "cnt[0] == 0 and cnt[1] == 0", "cnt[0] == 0", "cnt[0]", "cnt", "0", "0", "cnt[1] == 0", "cnt[1]", "cnt", "1", "0", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "print(\"No\")", "print", "\"No\"", "p = ['N', 'S', 'E', 'W']", "['N', 'S', 'E', 'W']", "p", "cnt = []", "[]", "cnt", "s = input()", "input()", "s" ]
s = input() p = ['N', 'S', 'E', 'W'] cnt = [] for i in p: cnt.append(s.count(i)) if cnt[0] != 0 and cnt[1] != 0 or cnt[0] == 0 and cnt[1] == 0: if cnt[2] != 0 and cnt[3] != 0 or cnt[2] == 0 and cnt[3] == 0: print("Yes") else: print("No") elif cnt[2] != 0 and cnt[3] != 0 or cnt[2] == 0 and cnt[3] == 0: if cnt[0] != 0 and cnt[1] != 0 or cnt[0] == 0 and cnt[1] == 0: print("Yes") else: print("No") else: print("No")
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 13, 0, 13, 4, 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, 2, 17, 13, 2, 17, 13, 40, 17, 13, 40, 17, 13, 4, 13, 17, 14, 2, 2, 2, 40, 17, 13, 40, 17, 13, 2, 17, 13, 2, 17, 13, 4, 13, 17, 14, 2, 2, 2, 40, 17, 13, 40, 17, 13, 40, 17, 13, 40, 17, 13, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 100, 2 ], [ 97, 8 ], [ 101, 11 ], [ 103, 13 ], [ 98, 16 ], [ 101, 16 ], [ 104, 23 ], [ 98, 23 ], [ 101, 23 ], [ 104, 26 ], [ 98, 26 ], [ 101, 26 ], [ 104, 29 ], [ 98, 29 ], [ 101, 29 ], [ 104, 32 ], [ 98, 32 ], [ 101, 32 ], [ 104, 42 ], [ 98, 42 ], [ 101, 42 ], [ 104, 45 ], [ 98, 45 ], [ 101, 45 ], [ 104, 48 ], [ 98, 48 ], [ 101, 48 ], [ 104, 51 ], [ 98, 51 ], [ 101, 51 ], [ 104, 61 ], [ 98, 61 ], [ 101, 61 ], [ 104, 64 ], [ 98, 64 ], [ 101, 64 ], [ 104, 67 ], [ 98, 67 ], [ 101, 67 ], [ 104, 70 ], [ 98, 70 ], [ 101, 70 ], [ 104, 80 ], [ 98, 80 ], [ 101, 80 ], [ 104, 83 ], [ 98, 83 ], [ 101, 83 ], [ 104, 86 ], [ 98, 86 ], [ 101, 86 ], [ 104, 89 ], [ 98, 89 ], [ 101, 89 ], [ 97, 98 ], [ 100, 101 ], [ 103, 104 ] ]
[ "\ns = list(input())\ns = set(s)\ns = list(s)\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 \"W\" not in s and \"E\" not in s:\n print(\"Yes\")\nelif \"N\" not in s and \"S\" not in s and \"W\" in s and \"E\" in s:\n print(\"Yes\")\nelif \"N\" not in s and \"S\" not in s and \"W\" not in s and \"E\" not in s:\n print(\"Yes\")\nelse:\n print(\"No\")", "s = list(input())", "s", "list(input())", "list", "input()", "input", "s = set(s)", "s", "set(s)", "set", "s", "s = list(s)", "s", "list(s)", "list", "s", "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 \"W\" not in s and \"E\" not in s:\n print(\"Yes\")\nelif \"N\" not in s and \"S\" not in s and \"W\" in s and \"E\" in s:\n print(\"Yes\")\nelif \"N\" not in s and \"S\" not in s and \"W\" not in s and \"E\" not 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 and \"W\" in s", "\"N\" in s and \"S\" in s", "\"N\" in s", "\"N\"", "s", "\"S\" in s", "\"S\"", "s", "\"W\" in s", "\"W\"", "s", "\"E\" in s", "\"E\"", "s", "print(\"Yes\")", "print", "\"Yes\"", "elif \"N\" in s and \"S\" in s and \"W\" not in s and \"E\" not in s:\n print(\"Yes\")", "\"N\" in s and \"S\" in s and \"W\" not in s and \"E\" not in s", "\"N\" in s and \"S\" in s and \"W\" not in s", "\"N\" in s and \"S\" in s", "\"N\" in s", "\"N\"", "s", "\"S\" in s", "\"S\"", "s", "\"W\" not in s", "\"W\"", "s", "\"E\" not in s", "\"E\"", "s", "print(\"Yes\")", "print", "\"Yes\"", "elif \"N\" not in s and \"S\" not in s and \"W\" in s and \"E\" in s:\n print(\"Yes\")", "\"N\" not in s and \"S\" not in s and \"W\" in s and \"E\" in s", "\"N\" not in s and \"S\" not in s and \"W\" in s", "\"N\" not in s and \"S\" not in s", "\"N\" not in s", "\"N\"", "s", "\"S\" not in s", "\"S\"", "s", "\"W\" in s", "\"W\"", "s", "\"E\" in s", "\"E\"", "s", "print(\"Yes\")", "print", "\"Yes\"", "elif \"N\" not in s and \"S\" not in s and \"W\" not in s and \"E\" not in s:\n print(\"Yes\")", "\"N\" not in s and \"S\" not in s and \"W\" not in s and \"E\" not in s", "\"N\" not in s and \"S\" not in s and \"W\" not in s", "\"N\" not in s and \"S\" not in s", "\"N\" not in s", "\"N\"", "s", "\"S\" not in s", "\"S\"", "s", "\"W\" not in s", "\"W\"", "s", "\"E\" not in s", "\"E\"", "s", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "s = set(s)", "set(s)", "s", "s = list(input())", "list(input())", "s", "s = list(s)", "list(s)", "s" ]
s = list(input()) s = set(s) s = list(s) 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 "W" not in s and "E" not in s: print("Yes") elif "N" not in s and "S" not in s and "W" in s and "E" in s: print("Yes") elif "N" not in s and "S" not in s and "W" not in s and "E" not in s: print("Yes") else: print("No")
[ 7, 0, 31, 13, 4, 13, 0, 13, 17, 0, 13, 17, 14, 2, 2, 17, 13, 2, 17, 13, 0, 13, 17, 14, 2, 40, 17, 13, 40, 17, 13, 0, 13, 17, 14, 2, 2, 17, 13, 2, 17, 13, 0, 13, 17, 14, 2, 40, 17, 13, 40, 17, 13, 0, 13, 17, 14, 2, 13, 13, 4, 13, 17, 4, 13, 17, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 4, 2 ], [ 67, 7 ], [ 82, 10 ], [ 79, 21 ], [ 73, 32 ], [ 70, 43 ], [ 76, 54 ], [ 77, 58 ], [ 71, 58 ], [ 68, 58 ], [ 74, 59 ], [ 80, 59 ], [ 83, 59 ], [ 67, 68 ], [ 70, 71 ], [ 73, 74 ], [ 76, 77 ], [ 79, 80 ], [ 82, 83 ] ]
[ "*S, = input()\n\nflag_x = False\nflag_y = False\n\nif 'S' in S and 'N' in S:\n flag_y = True\nif 'S' not in S and 'N' not in S:\n flag_y = True\n\nif 'E' in S and 'W' in S:\n flag_x = True\nif 'E' not in S and 'W' not in S:\n flag_x = True\n\nif flag_x and flag_y:\n print('Yes')\nelse:\n print('No')", "*S, = input()", "*S", "S", "input()", "input", "flag_x = False", "flag_x", "False", "flag_y = False", "flag_y", "False", "if 'S' in S and 'N' in S:\n flag_y = True", "'S' in S and 'N' in S", "'S' in S", "'S'", "S", "'N' in S", "'N'", "S", "flag_y = True", "flag_y", "True", "if 'S' not in S and 'N' not in S:\n flag_y = True", "'S' not in S and 'N' not in S", "'S' not in S", "'S'", "S", "'N' not in S", "'N'", "S", "flag_y = True", "flag_y", "True", "if 'E' in S and 'W' in S:\n flag_x = True", "'E' in S and 'W' in S", "'E' in S", "'E'", "S", "'W' in S", "'W'", "S", "flag_x = True", "flag_x", "True", "if 'E' not in S and 'W' not in S:\n flag_x = True", "'E' not in S and 'W' not in S", "'E' not in S", "'E'", "S", "'W' not in S", "'W'", "S", "flag_x = True", "flag_x", "True", "if flag_x and flag_y:\n print('Yes')\nelse:\n print('No')", "flag_x and flag_y", "flag_x", "flag_y", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "flag_x = False", "False", "flag_x", "flag_x = True", "True", "flag_x", "flag_y = True", "True", "flag_y", "flag_x = True", "True", "flag_x", "flag_y = True", "True", "flag_y", "flag_y = False", "False", "flag_y" ]
*S, = input() flag_x = False flag_y = False if 'S' in S and 'N' in S: flag_y = True if 'S' not in S and 'N' not in S: flag_y = True if 'E' in S and 'W' in S: flag_x = True if 'E' not in S and 'W' not in S: flag_x = True if flag_x and flag_y: print('Yes') else: print('No')
[ 7, 0, 13, 4, 13, 14, 2, 2, 2, 17, 13, 2, 17, 13, 17, 4, 13, 17, 14, 2, 2, 2, 17, 13, 2, 17, 13, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13 ]
[ [ 35, 2 ], [ 36, 10 ], [ 36, 13 ], [ 36, 23 ], [ 36, 26 ], [ 35, 36 ] ]
[ "s=input()\nif (('W' in s)+('E' in s))%2:\n\tprint('No')\nelif (('N' in s)+('S' in s))%2:\n\tprint('No')\nelse:\n\tprint('Yes')", "s=input()", "s", "input()", "input", "if (('W' in s)+('E' in s))%2:\n\tprint('No')\nelif (('N' in s)+('S' in s))%2:\n\tprint('No')\nelse:\n\tprint('Yes')", "(('W' in s)+('E' in s))%2", "('W' in s)+('E' in s)", "'W' in s", "'W'", "s", "'E' in s", "'E'", "s", "2", "print('No')", "print", "'No'", "elif (('N' in s)+('S' in s))%2:\n\tprint('No')", "(('N' in s)+('S' in s))%2", "('N' in s)+('S' in s)", "'N' in s", "'N'", "s", "'S' in s", "'S'", "s", "2", "print('No')", "print", "'No'", "print('Yes')", "print", "'Yes'", "s=input()", "input()", "s" ]
s=input() if (('W' in s)+('E' in s))%2: print('No') elif (('N' in s)+('S' in s))%2: print('No') else: print('Yes')
[ 7, 14, 2, 13, 17, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 0, 13, 17, 0, 13, 17, 28, 13, 13, 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, 2, 2, 2, 13, 17, 2, 13, 17, 2, 2, 13, 17, 2, 13, 17, 2, 2, 2, 13, 17, 2, 13, 17, 2, 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, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 103, 6 ], [ 109, 10 ], [ 94, 13 ], [ 112, 16 ], [ 115, 19 ], [ 23, 22 ], [ 104, 22 ], [ 22, 26 ], [ 100, 29 ], [ 22, 33 ], [ 97, 36 ], [ 22, 40 ], [ 106, 43 ], [ 22, 47 ], [ 91, 50 ], [ 107, 57 ], [ 110, 57 ], [ 92, 60 ], [ 95, 60 ], [ 107, 64 ], [ 110, 64 ], [ 92, 67 ], [ 95, 67 ], [ 101, 72 ], [ 113, 72 ], [ 98, 75 ], [ 116, 75 ], [ 101, 79 ], [ 113, 79 ], [ 98, 82 ], [ 116, 82 ], [ 91, 92 ], [ 94, 95 ], [ 97, 98 ], [ 100, 101 ], [ 103, 104 ], [ 106, 107 ], [ 109, 110 ], [ 112, 113 ], [ 115, 116 ] ]
[ "if __name__ == '__main__':\n s = input()\n x1 =0\n x2=0\n y1=0\n y2=0\n\n for i in s:\n if i ==\"N\":\n y1+=1\n if i == \"S\":\n y2+=1\n if i == \"E\":\n x1+=1\n if i == \"W\":\n x2+=1\n if ((x1 ==0 and x2 ==0) or (x1>0 and x2>0) ) and ((y1 ==0 and y2 ==0)or(y1 > 0and y2 > 0)):\n print(\"Yes\")\n else:\n print(\"No\")", "if __name__ == '__main__':\n s = input()\n x1 =0\n x2=0\n y1=0\n y2=0\n\n for i in s:\n if i ==\"N\":\n y1+=1\n if i == \"S\":\n y2+=1\n if i == \"E\":\n x1+=1\n if i == \"W\":\n x2+=1\n if ((x1 ==0 and x2 ==0) or (x1>0 and x2>0) ) and ((y1 ==0 and y2 ==0)or(y1 > 0and y2 > 0)):\n print(\"Yes\")\n else:\n print(\"No\")", "__name__ == '__main__'", "__name__", "'__main__'", "s = input()", "s", "input()", "input", "x1 =0", "x1", "0", "x2=0", "x2", "0", "y1=0", "y1", "0", "y2=0", "y2", "0", "for i in s:\n if i ==\"N\":\n y1+=1\n if i == \"S\":\n y2+=1\n if i == \"E\":\n x1+=1\n if i == \"W\":\n x2+=1\n ", "i", "s", "if i ==\"N\":\n y1+=1\n ", "i ==\"N\"", "i", "\"N\"", "y1+=1", "y1", "1", "if i == \"S\":\n y2+=1\n ", "i == \"S\"", "i", "\"S\"", "y2+=1", "y2", "1", "if i == \"E\":\n x1+=1\n ", "i == \"E\"", "i", "\"E\"", "x1+=1", "x1", "1", "if i == \"W\":\n x2+=1\n ", "i == \"W\"", "i", "\"W\"", "x2+=1", "x2", "1", "if ((x1 ==0 and x2 ==0) or (x1>0 and x2>0) ) and ((y1 ==0 and y2 ==0)or(y1 > 0and y2 > 0)):\n print(\"Yes\")\n else:\n print(\"No\")", "((x1 ==0 and x2 ==0) or (x1>0 and x2>0) ) and ((y1 ==0 and y2 ==0)or(y1 > 0and y2 > 0))", "(x1 ==0 and x2 ==0) or (x1>0 and x2>0)", "x1 ==0 and x2 ==0", "x1 ==0", "x1", "0", "x2 ==0", "x2", "0", "x1>0 and x2>0", "x1>0", "x1", "0", "x2>0", "x2", "0", "(y1 ==0 and y2 ==0)or(y1 > 0and y2 > 0)", "y1 ==0 and y2 ==0", "y1 ==0", "y1", "0", "y2 ==0", "y2", "0", "y1 > 0and y2 > 0", "y1 > 0", "y1", "0", "y2 > 0", "y2", "0", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "x2+=1", "1", "x2", "x2=0", "0", "x2", "y2+=1", "1", "y2", "y1+=1", "1", "y1", "s = input()", "input()", "s", "x1+=1", "1", "x1", "x1 =0", "0", "x1", "y1=0", "0", "y1", "y2=0", "0", "y2" ]
if __name__ == '__main__': s = input() x1 =0 x2=0 y1=0 y2=0 for i in s: if i =="N": y1+=1 if i == "S": y2+=1 if i == "E": x1+=1 if i == "W": x2+=1 if ((x1 ==0 and x2 ==0) or (x1>0 and x2>0) ) and ((y1 ==0 and y2 ==0)or(y1 > 0and y2 > 0)): print("Yes") else: print("No")
[ 7, 15, 0, 13, 4, 13, 4, 13, 14, 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, 17, 4, 13, 17, 10, 4, 13 ]
[ [ 39, 3 ], [ 40, 13 ], [ 40, 18 ], [ 40, 24 ], [ 40, 29 ], [ 39, 40 ] ]
[ "from collections import Counter\ns = Counter(input())\nif (s['N'] > 0) ^ (s['S'] > 0) or (s['E'] > 0) ^ (s['W'] > 0):\n print('No')\nelse:\n print('Yes')", "from collections import Counter", "s = Counter(input())", "s", "Counter(input())", "Counter", "input()", "input", "if (s['N'] > 0) ^ (s['S'] > 0) or (s['E'] > 0) ^ (s['W'] > 0):\n print('No')\nelse:\n print('Yes')", "(s['N'] > 0) ^ (s['S'] > 0) or (s['E'] > 0) ^ (s['W'] > 0)", "(s['N'] > 0) ^ (s['S'] > 0)", "s['N'] > 0", "s['N']", "s", "'N'", "0", "s['S'] > 0", "s['S']", "s", "'S'", "0", "(s['E'] > 0) ^ (s['W'] > 0)", "s['E'] > 0", "s['E']", "s", "'E'", "0", "s['W'] > 0", "s['W']", "s", "'W'", "0", "print('No')", "print", "'No'", "print('Yes')", "print", "'Yes'", "s = Counter(input())", "Counter(input())", "s" ]
from collections import Counter s = Counter(input()) if (s['N'] > 0) ^ (s['S'] > 0) or (s['E'] > 0) ^ (s['W'] > 0): print('No') else: print('Yes')
[ 7, 0, 13, 4, 18, 4, 13, 13, 0, 13, 17, 14, 2, 40, 4, 18, 13, 13, 17, 4, 18, 13, 13, 17, 2, 2, 4, 18, 13, 13, 17, 4, 18, 13, 13, 17, 17, 0, 13, 17, 14, 2, 2, 2, 4, 18, 13, 13, 17, 4, 18, 13, 13, 17, 17, 40, 4, 18, 13, 13, 17, 4, 18, 13, 13, 17, 0, 13, 17, 4, 13, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13 ]
[ [ 82, 2 ], [ 79, 9 ], [ 83, 16 ], [ 83, 21 ], [ 83, 28 ], [ 83, 33 ], [ 73, 38 ], [ 83, 46 ], [ 83, 51 ], [ 83, 58 ], [ 83, 63 ], [ 76, 67 ], [ 77, 71 ], [ 74, 71 ], [ 80, 71 ], [ 73, 74 ], [ 76, 77 ], [ 79, 80 ], [ 82, 83 ] ]
[ "s= input().strip()\nf=\"Yes\"\nif (s.count('N')!=s.count('S') and s.count('N')*s.count('S')==0):\n f=\"No\"\nelif(s.count('E')*s.count('W')==0 and s.count('E')!=s.count('W')):\n f=\"No\"\nprint(f)", "s= input().strip()", "s", "input().strip()", "().strip", "()", "input", "strip", "f=\"Yes\"", "f", "\"Yes\"", "if (s.count('N')!=s.count('S') and s.count('N')*s.count('S')==0):\n f=\"No\"\nelif(s.count('E')*s.count('W')==0 and s.count('E')!=s.count('W')):\n f=\"No\"", "s.count('N')!=s.count('S') and s.count('N')*s.count('S')==0", "s.count('N')!=s.count('S')", "s.count('N')", "s.count", "s", "count", "'N'", "s.count('S')", "s.count", "s", "count", "'S'", "s.count('N')*s.count('S')==0", "s.count('N')*s.count('S')", "s.count('N')", "s.count", "s", "count", "'N'", "s.count('S')", "s.count", "s", "count", "'S'", "0", "f=\"No\"", "f", "\"No\"", "elif(s.count('E')*s.count('W')==0 and s.count('E')!=s.count('W')):\n f=\"No\"", "s.count('E')*s.count('W')==0 and s.count('E')!=s.count('W')", "s.count('E')*s.count('W')==0", "s.count('E')*s.count('W')", "s.count('E')", "s.count", "s", "count", "'E'", "s.count('W')", "s.count", "s", "count", "'W'", "0", "s.count('E')!=s.count('W')", "s.count('E')", "s.count", "s", "count", "'E'", "s.count('W')", "s.count", "s", "count", "'W'", "f=\"No\"", "f", "\"No\"", "print(f)", "print", "f", "f=\"No\"", "\"No\"", "f", "f=\"No\"", "\"No\"", "f", "f=\"Yes\"", "\"Yes\"", "f", "s= input().strip()", "input().strip()", "s" ]
s= input().strip() f="Yes" if (s.count('N')!=s.count('S') and s.count('N')*s.count('S')==0): f="No" elif(s.count('E')*s.count('W')==0 and s.count('E')!=s.count('W')): f="No" print(f)
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 17, 0, 13, 17, 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, 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, 4, 13, 17, 10, 4, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 86, 2 ], [ 92, 8 ], [ 89, 11 ], [ 87, 19 ], [ 87, 26 ], [ 87, 34 ], [ 87, 41 ], [ 87, 51 ], [ 87, 58 ], [ 87, 66 ], [ 87, 73 ], [ 86, 87 ], [ 89, 90 ], [ 92, 93 ] ]
[ "s = list(input())\nx = 0\ny = 0\n\nif (s.count(\"S\") > 0 and s.count(\"N\") > 0) or (s.count(\"S\") == 0 and s.count(\"N\") == 0):\n if (s.count(\"E\") > 0 and s.count(\"W\") > 0) or (s.count(\"E\") == 0 and s.count(\"W\") == 0):\n print(\"Yes\")\n exit()\n \nprint(\"No\")", "s = list(input())", "s", "list(input())", "list", "input()", "input", "x = 0", "x", "0", "y = 0", "y", "0", "if (s.count(\"S\") > 0 and s.count(\"N\") > 0) or (s.count(\"S\") == 0 and s.count(\"N\") == 0):\n if (s.count(\"E\") > 0 and s.count(\"W\") > 0) or (s.count(\"E\") == 0 and s.count(\"W\") == 0):\n print(\"Yes\")\n exit()\n ", "(s.count(\"S\") > 0 and s.count(\"N\") > 0) or (s.count(\"S\") == 0 and s.count(\"N\") == 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", "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", "if (s.count(\"E\") > 0 and s.count(\"W\") > 0) or (s.count(\"E\") == 0 and s.count(\"W\") == 0):\n print(\"Yes\")\n exit()\n ", "(s.count(\"E\") > 0 and s.count(\"W\") > 0) or (s.count(\"E\") == 0 and s.count(\"W\") == 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(\"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", "print(\"Yes\")", "print", "\"Yes\"", "exit()", "exit", "print(\"No\")", "print", "\"No\"", "s = list(input())", "list(input())", "s", "y = 0", "0", "y", "x = 0", "0", "x" ]
s = list(input()) x = 0 y = 0 if (s.count("S") > 0 and s.count("N") > 0) or (s.count("S") == 0 and s.count("N") == 0): if (s.count("E") > 0 and s.count("W") > 0) or (s.count("E") == 0 and s.count("W") == 0): print("Yes") exit() print("No")
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 0, 13, 17, 14, 2, 4, 13, 4, 13, 13, 17, 0, 13, 17, 14, 2, 2, 4, 13, 13, 17, 2, 4, 18, 13, 13, 17, 4, 18, 13, 13, 17, 0, 13, 17, 14, 2, 2, 4, 13, 13, 17, 2, 4, 18, 13, 13, 17, 4, 18, 13, 13, 17, 0, 13, 17, 0, 13, 17, 4, 13, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13 ]
[ [ 78, 2 ], [ 93, 6 ], [ 79, 11 ], [ 90, 13 ], [ 79, 21 ], [ 87, 24 ], [ 94, 31 ], [ 94, 36 ], [ 94, 41 ], [ 75, 45 ], [ 94, 52 ], [ 94, 57 ], [ 94, 62 ], [ 84, 66 ], [ 81, 69 ], [ 82, 73 ], [ 85, 73 ], [ 76, 73 ], [ 88, 73 ], [ 91, 73 ], [ 75, 76 ], [ 78, 79 ], [ 81, 82 ], [ 84, 85 ], [ 87, 88 ], [ 90, 91 ], [ 93, 94 ] ]
[ "s = input()\nlist_s = list(set(s))\nans = ''\nif len(set(s)) == 4:\n ans = 'Yes'\nelif len(list_s) == 2 and list_s.count('E') == list_s.count('W'):\n ans = 'Yes'\nelif len(list_s) == 2 and list_s.count('N') == list_s.count('S'):\n ans = 'Yes'\nelse:\n ans = 'No'\nprint(ans)", "s = input()", "s", "input()", "input", "list_s = list(set(s))", "list_s", "list(set(s))", "list", "set(s)", "set", "s", "ans = ''", "ans", "''", "if len(set(s)) == 4:\n ans = 'Yes'\nelif len(list_s) == 2 and list_s.count('E') == list_s.count('W'):\n ans = 'Yes'\nelif len(list_s) == 2 and list_s.count('N') == list_s.count('S'):\n ans = 'Yes'\nelse:\n ans = 'No'", "len(set(s)) == 4", "len(set(s))", "len", "set(s)", "set", "s", "4", "ans = 'Yes'", "ans", "'Yes'", "elif len(list_s) == 2 and list_s.count('E') == list_s.count('W'):\n ans = 'Yes'", "len(list_s) == 2 and list_s.count('E') == list_s.count('W')", "len(list_s) == 2", "len(list_s)", "len", "list_s", "2", "list_s.count('E') == list_s.count('W')", "list_s.count('E')", "list_s.count", "list_s", "count", "'E'", "list_s.count('W')", "list_s.count", "list_s", "count", "'W'", "ans = 'Yes'", "ans", "'Yes'", "elif len(list_s) == 2 and list_s.count('N') == list_s.count('S'):\n ans = 'Yes'", "len(list_s) == 2 and list_s.count('N') == list_s.count('S')", "len(list_s) == 2", "len(list_s)", "len", "list_s", "2", "list_s.count('N') == list_s.count('S')", "list_s.count('N')", "list_s.count", "list_s", "count", "'N'", "list_s.count('S')", "list_s.count", "list_s", "count", "'S'", "ans = 'Yes'", "ans", "'Yes'", "ans = 'No'", "ans", "'No'", "print(ans)", "print", "ans", "ans = 'Yes'", "'Yes'", "ans", "s = input()", "input()", "s", "ans = 'No'", "'No'", "ans", "ans = 'Yes'", "'Yes'", "ans", "ans = 'Yes'", "'Yes'", "ans", "ans = ''", "''", "ans", "list_s = list(set(s))", "list(set(s))", "list_s" ]
s = input() list_s = list(set(s)) ans = '' if len(set(s)) == 4: ans = 'Yes' elif len(list_s) == 2 and list_s.count('E') == list_s.count('W'): ans = 'Yes' elif len(list_s) == 2 and list_s.count('N') == list_s.count('S'): ans = 'Yes' else: ans = 'No' print(ans)
[ 7, 15, 0, 13, 4, 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 ]
[ [ 54, 3 ], [ 55, 10 ], [ 55, 13 ], [ 55, 21 ], [ 55, 24 ], [ 55, 32 ], [ 55, 35 ], [ 55, 43 ], [ 55, 46 ], [ 54, 55 ] ]
[ "from collections import Counter\n\nS = input()\nif \"N\" in S and \"S\" not in S:\n print(\"No\")\nelif \"S\" in S and \"N\" not in S:\n print(\"No\")\nelif \"E\" in S and \"W\" not in S:\n print(\"No\")\nelif \"W\" in S and \"E\" not in S:\n print(\"No\")\nelse:\n print(\"Yes\")", "from collections import Counter", "S = input()", "S", "input()", "input", "if \"N\" in S and \"S\" not in S:\n print(\"No\")\nelif \"S\" in S and \"N\" not in S:\n print(\"No\")\nelif \"E\" in S and \"W\" not in S:\n print(\"No\")\nelif \"W\" in S and \"E\" not in S:\n print(\"No\")\nelse:\n print(\"Yes\")", "\"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\"", "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 \"W\" in S and \"E\" not in S:\n print(\"No\")", "\"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" ]
from collections import Counter S = input() if "N" in S and "S" not in S: print("No") elif "S" in S and "N" not in S: print("No") elif "E" in S and "W" not in S: print("No") elif "W" in S and "E" not in S: print("No") else: print("Yes")
[ 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, 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 ]
[ [ 70, 2 ], [ 71, 11 ], [ 71, 14 ], [ 71, 17 ], [ 71, 20 ], [ 71, 31 ], [ 71, 35 ], [ 71, 38 ], [ 71, 41 ], [ 71, 51 ], [ 71, 54 ], [ 71, 58 ], [ 71, 62 ], [ 70, 71 ] ]
[ "s = input()\nif \"N\" in s and \"S\" in s and \"W\" in s and \"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\")\nelif \"N\" in s and \"S\" in s and not \"W\" in s and not \"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 not \"N\" in s and not \"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\")\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 and \"W\" in s", "\"N\" in s and \"S\" in s", "\"N\" in s", "\"N\"", "s", "\"S\" in s", "\"S\"", "s", "\"W\" in s", "\"W\"", "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 and \"W\" 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", "\"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 and not \"W\" in s", "\"N\" in s and \"S\" in s", "\"N\" in s", "\"N\"", "s", "\"S\" in s", "\"S\"", "s", "not \"W\" in s", "\"W\" in s", "\"W\"", "s", "not \"E\" in 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 not "N" in s and not "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") 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, 14, 2, 2, 2, 2, 13, 13, 17, 2, 2, 13, 17, 2, 13, 17, 2, 2, 2, 13, 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 ]
[ [ 80, 2 ], [ 77, 6 ], [ 81, 9 ], [ 68, 13 ], [ 81, 16 ], [ 74, 20 ], [ 81, 23 ], [ 71, 27 ], [ 81, 30 ], [ 78, 38 ], [ 75, 39 ], [ 78, 43 ], [ 75, 46 ], [ 72, 51 ], [ 69, 52 ], [ 69, 56 ], [ 72, 59 ], [ 68, 69 ], [ 71, 72 ], [ 74, 75 ], [ 77, 78 ], [ 80, 81 ] ]
[ "s = input()\n\nN = s.count(\"N\")\nW = s.count(\"W\")\nS = s.count(\"S\")\nE = s.count(\"E\")\n\n\nif (N == S == 0 or (N > 0 and S > 0)) and (E == W == 0 or (W > 0 and E > 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\"", "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 or (N > 0 and S > 0)) and (E == W == 0 or (W > 0 and E > 0)):\n print(\"Yes\")\nelse:\n print(\"No\")", "(N == S == 0 or (N > 0 and S > 0)) and (E == W == 0 or (W > 0 and E > 0))", "N == S == 0 or (N > 0 and S > 0)", "N == S == 0", "N == S", "N", "S", "0", "N > 0 and S > 0", "N > 0", "N", "0", "S > 0", "S", "0", "E == W == 0 or (W > 0 and E > 0)", "E == W == 0", "E == W", "E", "W", "0", "W > 0 and E > 0", "W > 0", "W", "0", "E > 0", "E", "0", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "W = s.count(\"W\")", "s.count(\"W\")", "W", "E = s.count(\"E\")", "s.count(\"E\")", "E", "S = s.count(\"S\")", "s.count(\"S\")", "S", "N = s.count(\"N\")", "s.count(\"N\")", "N", "s = input()", "input()", "s" ]
s = input() N = s.count("N") W = s.count("W") S = s.count("S") E = s.count("E") if (N == S == 0 or (N > 0 and S > 0)) and (E == W == 0 or (W > 0 and E > 0)): print("Yes") else: print("No")
[ 7, 0, 13, 4, 13, 41, 28, 13, 17, 4, 2, 13, 13, 0, 13, 13, 14, 2, 2, 18, 13, 17, 18, 13, 17, 2, 18, 13, 17, 18, 13, 17, 4, 13, 17, 4, 13, 17, 10, 13, 13, 10, 4, 13 ]
[ [ 42, 2 ], [ 8, 7 ], [ 7, 11 ], [ 43, 12 ], [ 39, 14 ], [ 40, 20 ], [ 40, 23 ], [ 40, 27 ], [ 40, 30 ], [ 39, 40 ], [ 42, 43 ] ]
[ "s = input()\n\nd = [c in s for c in 'NSEW']\nif d[0] == d[1] and d[2] == d[3]:\n print('Yes')\nelse:\n print('No')", "s = input()", "s", "input()", "input", "c in s for c in 'NSEW'", "for c in 'NSEW'", "c", "'NSEW'", "for c in 'NSEW'", "c in s", "c", "s", "d = [c in s for c in 'NSEW']", "d", "[c in s for c in 'NSEW']", "if d[0] == d[1] and d[2] == d[3]:\n print('Yes')\nelse:\n print('No')", "d[0] == d[1] and d[2] == d[3]", "d[0] == d[1]", "d[0]", "d", "0", "d[1]", "d", "1", "d[2] == d[3]", "d[2]", "d", "2", "d[3]", "d", "3", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "d = [c in s for c in 'NSEW']", "[c in s for c in 'NSEW']", "d", "s = input()", "input()", "s" ]
s = input() d = [c in s for c in 'NSEW'] if d[0] == d[1] and d[2] == d[3]: print('Yes') else: print('No')
[ 7, 0, 13, 4, 13, 14, 2, 4, 18, 13, 13, 17, 17, 14, 2, 4, 18, 13, 13, 17, 17, 4, 13, 17, 4, 13, 14, 2, 4, 18, 13, 13, 17, 17, 14, 2, 4, 18, 13, 13, 17, 17, 4, 13, 17, 4, 13, 14, 2, 4, 18, 13, 13, 17, 17, 14, 2, 4, 18, 13, 13, 17, 17, 4, 13, 17, 4, 13, 14, 2, 4, 18, 13, 13, 17, 17, 14, 2, 4, 18, 13, 13, 17, 17, 4, 13, 17, 4, 13, 4, 13, 17, 10, 4, 13 ]
[ [ 93, 2 ], [ 94, 9 ], [ 94, 17 ], [ 94, 30 ], [ 94, 38 ], [ 94, 51 ], [ 94, 59 ], [ 94, 72 ], [ 94, 80 ], [ 93, 94 ] ]
[ "s = input()\n\nif s.count(\"N\") > 0:\n if s.count(\"S\") == 0:\n print(\"No\")\n exit()\n\nif s.count(\"S\") > 0:\n if s.count(\"N\") == 0:\n print(\"No\")\n exit()\n\nif s.count(\"W\") > 0:\n if s.count(\"E\") == 0:\n print(\"No\")\n exit()\n\nif s.count(\"E\") > 0:\n if s.count(\"W\") == 0:\n print(\"No\")\n exit()\n\nprint(\"Yes\")", "s = input()", "s", "input()", "input", "if s.count(\"N\") > 0:\n if s.count(\"S\") == 0:\n print(\"No\")\n exit()", "s.count(\"N\") > 0", "s.count(\"N\")", "s.count", "s", "count", "\"N\"", "0", "if s.count(\"S\") == 0:\n print(\"No\")\n exit()", "s.count(\"S\") == 0", "s.count(\"S\")", "s.count", "s", "count", "\"S\"", "0", "print(\"No\")", "print", "\"No\"", "exit()", "exit", "if s.count(\"S\") > 0:\n if s.count(\"N\") == 0:\n print(\"No\")\n exit()", "s.count(\"S\") > 0", "s.count(\"S\")", "s.count", "s", "count", "\"S\"", "0", "if s.count(\"N\") == 0:\n print(\"No\")\n exit()", "s.count(\"N\") == 0", "s.count(\"N\")", "s.count", "s", "count", "\"N\"", "0", "print(\"No\")", "print", "\"No\"", "exit()", "exit", "if s.count(\"W\") > 0:\n if s.count(\"E\") == 0:\n print(\"No\")\n exit()", "s.count(\"W\") > 0", "s.count(\"W\")", "s.count", "s", "count", "\"W\"", "0", "if s.count(\"E\") == 0:\n print(\"No\")\n exit()", "s.count(\"E\") == 0", "s.count(\"E\")", "s.count", "s", "count", "\"E\"", "0", "print(\"No\")", "print", "\"No\"", "exit()", "exit", "if s.count(\"E\") > 0:\n if s.count(\"W\") == 0:\n print(\"No\")\n exit()", "s.count(\"E\") > 0", "s.count(\"E\")", "s.count", "s", "count", "\"E\"", "0", "if s.count(\"W\") == 0:\n print(\"No\")\n exit()", "s.count(\"W\") == 0", "s.count(\"W\")", "s.count", "s", "count", "\"W\"", "0", "print(\"No\")", "print", "\"No\"", "exit()", "exit", "print(\"Yes\")", "print", "\"Yes\"", "s = input()", "input()", "s" ]
s = input() if s.count("N") > 0: if s.count("S") == 0: print("No") exit() if s.count("S") > 0: if s.count("N") == 0: print("No") exit() if s.count("W") > 0: if s.count("E") == 0: print("No") exit() if s.count("E") > 0: if s.count("W") == 0: print("No") exit() print("Yes")
[ 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('S') > 0) == (S.count('N') > 0) and (S.count('E') > 0) == (S.count('W') > 0):\n print('Yes')\nelse:\n print('No')", "S = input()", "S", "input()", "input", "if (S.count('S') > 0) == (S.count('N') > 0) and (S.count('E') > 0) == (S.count('W') > 0):\n print('Yes')\nelse:\n print('No')", "(S.count('S') > 0) == (S.count('N') > 0) and (S.count('E') > 0) == (S.count('W') > 0)", "(S.count('S') > 0) == (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", "(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('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "S = input()", "input()", "S" ]
S = input() if (S.count('S') > 0) == (S.count('N') > 0) and (S.count('E') > 0) == (S.count('W') > 0): print('Yes') else: print('No')
[ 7, 15, 13, 15, 15, 13, 15, 12, 13, 12, 13, 12, 13, 12, 13, 23, 12, 13, 23, 0, 13, 2, 4, 13, 17, 17, 0, 13, 17, 0, 13, 4, 13, 17, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 13, 13, 14, 2, 17, 13, 14, 2, 17, 13, 14, 2, 17, 13, 14, 2, 17, 13, 4, 13, 8, 2, 40, 2, 13, 13, 40, 2, 13, 13, 17, 17, 17, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 4, 13, 10, 12, 13, 10, 12, 13, 10, 17, 13, 10, 12, 13, 10, 12, 13, 10, 2, 13, 10, 12, 13 ]
[ [ 111, 20 ], [ 81, 27 ], [ 93, 30 ], [ 90, 35 ], [ 102, 39 ], [ 102, 42 ], [ 102, 44 ], [ 102, 45 ], [ 91, 49 ], [ 91, 53 ], [ 91, 57 ], [ 91, 61 ], [ 79, 68 ], [ 103, 69 ], [ 88, 72 ], [ 85, 73 ], [ 102, 79 ], [ 81, 82 ], [ 102, 85 ], [ 102, 88 ], [ 90, 91 ], [ 93, 94 ], [ 102, 103 ], [ 111, 112 ] ]
[ "# JAI SHREE RAM\n\nimport math; from collections import *\nimport sys; from functools import reduce\n\n# sys.setrecursionlimit(10**6)\ndef get_ints(): return map(int, input().strip().split())\ndef get_list(): return list(get_ints())\ndef get_string(): return list(input().strip().split())\ndef printxsp(*args): return print(*args, end=\"\")\ndef printsp(*args): return print(*args, end=\" \")\n\nUGLYMOD = int(1e9)+7; SEXYMOD = 998244353; MAXN = int(1e5)\n\n# sys.stdin=open(\"input.txt\",\"r\");sys.stdout=open(\"output.txt\",\"w\")\n\n# for _testcases_ in range(int(input())):\nst = input()\nn = s = e = w = False\nif 'N' in st: n = True\nif 'S' in st: s = True\nif 'E' in st: e = True\nif 'W' in st: w = True\nprint(\"Yes\" if not(n^s) and not(e^w) else \"No\")\n\n\n'''\n>>> COMMENT THE STDIN!! CHANGE ONLINE JUDGE !!\nTHE LOGIC AND APPROACH IS MINE @luctivud ( UDIT GUPTA )\nLink may be copy-pasted here if it's taken from other source.\nDO NOT PLAGIARISE.\n>>> COMMENT THE STDIN!! CHANGE ONLINE JUDGE !!\n'''", "import math", "math", "from collections import *", "import sys", "sys", "from functools import reduce", "def get_ints(): return map(int, input().strip().split())", "get_ints", "def get_list(): return list(get_ints())", "get_list", "def get_string(): return list(input().strip().split())", "get_string", "def printxsp(*args): return print(*args, end=\"\")", "printxsp", "*args", "def printsp(*args): return print(*args, end=\" \")", "printsp", "*args", "UGLYMOD = int(1e9)+7", "UGLYMOD", "int(1e9)+7", "int(1e9)", "int", "1e9", "7", "SEXYMOD = 998244353", "SEXYMOD", "998244353", "MAXN = int(1e5)", "MAXN", "int(1e5)", "int", "1e5", "st = input()", "st", "input()", "input", "n = s = e = w = False", "n", "False", "= s = e = w = False", "s", "False", "e", "w", "if 'N' in st: n = True", "'N' in st", "'N'", "st", "if 'S' in st: s = True", "'S' in st", "'S'", "st", "if 'E' in st: e = True", "'E' in st", "'E'", "st", "if 'W' in st: w = True", "'W' in st", "'W'", "st", "print(\"Yes\" if not(n^s) and not(e^w) else \"No\")", "print", "\"Yes\" if not(n^s) and not(e^w) else \"No\"", "not(n^s) and not(e^w)", "not(n^s)", "n^s", "n", "s", "not(e^w)", "e^w", "e", "w", "\"Yes\"", "\"No\"", "'''\n>>> COMMENT THE STDIN!! CHANGE ONLINE JUDGE !!\nTHE LOGIC AND APPROACH IS MINE @luctivud ( UDIT GUPTA )\nLink may be copy-pasted here if it's taken from other source.\nDO NOT PLAGIARISE.\n>>> COMMENT THE STDIN!! CHANGE ONLINE JUDGE !!\n'''", "n = s = e = w = False", "False", "n", "SEXYMOD = 998244353", "998244353", "SEXYMOD", "w = False", "False", "w", "e = w = False", "False", "e", "st = input()", "input()", "st", "MAXN = int(1e5)", "int(1e5)", "MAXN", "def printxsp(*args): return print(*args, end=\"\")", "def printxsp(*args): return print(*args, end=\"\")", "printxsp", "def get_string(): return list(input().strip().split())", "def get_string(): return list(input().strip().split())", "get_string", "s = e = w = False", "False", "s", "def printsp(*args): return print(*args, end=\" \")", "def printsp(*args): return print(*args, end=\" \")", "printsp", "def get_ints(): return map(int, input().strip().split())", "def get_ints(): return map(int, input().strip().split())", "get_ints", "UGLYMOD = int(1e9)+7", "int(1e9)+7", "UGLYMOD", "def get_list(): return list(get_ints())", "def get_list(): return list(get_ints())", "get_list" ]
# JAI SHREE RAM import math; from collections import * import sys; from functools import reduce # sys.setrecursionlimit(10**6) def get_ints(): return map(int, input().strip().split()) def get_list(): return list(get_ints()) def get_string(): return list(input().strip().split()) def printxsp(*args): return print(*args, end="") def printsp(*args): return print(*args, end=" ") UGLYMOD = int(1e9)+7; SEXYMOD = 998244353; MAXN = int(1e5) # sys.stdin=open("input.txt","r");sys.stdout=open("output.txt","w") # for _testcases_ in range(int(input())): st = input() n = s = e = w = False if 'N' in st: n = True if 'S' in st: s = True if 'E' in st: e = True if 'W' in st: w = True print("Yes" if not(n^s) and not(e^w) else "No") ''' >>> COMMENT THE STDIN!! CHANGE ONLINE JUDGE !! THE LOGIC AND APPROACH IS MINE @luctivud ( UDIT GUPTA ) Link may be copy-pasted here if it's taken from other source. DO NOT PLAGIARISE. >>> COMMENT THE STDIN!! CHANGE ONLINE JUDGE !! '''
[ 7, 0, 13, 4, 13, 4, 13, 4, 13, 4, 13, 4, 13, 8, 2, 2, 2, 13, 39, 17, 17, 17, 17, 2, 13, 39, 17, 17, 2, 13, 39, 17, 17, 17, 17, 10, 4, 13 ]
[ [ 36, 2 ], [ 37, 17 ], [ 37, 24 ], [ 37, 29 ], [ 36, 37 ] ]
[ "S = list(sorted(set(input())))\nprint('Yes' if S == ['E', 'N', 'S', 'W'] or S == ['E', 'W'] or S == ['N', 'S'] else 'No')", "S = list(sorted(set(input())))", "S", "list(sorted(set(input())))", "list", "sorted(set(input()))", "sorted", "set(input())", "set", "input()", "input", "print('Yes' if S == ['E', 'N', 'S', 'W'] or S == ['E', 'W'] or S == ['N', 'S'] else 'No')", "print", "'Yes' if S == ['E', 'N', 'S', 'W'] or S == ['E', 'W'] or S == ['N', 'S'] else 'No'", "S == ['E', 'N', 'S', 'W'] or S == ['E', 'W'] or S == ['N', 'S']", "S == ['E', 'N', 'S', 'W'] or S == ['E', 'W']", "S == ['E', 'N', 'S', 'W']", "S", "['E', 'N', 'S', 'W']", "'E'", "'N'", "'S'", "'W'", "S == ['E', 'W']", "S", "['E', 'W']", "'E'", "'W'", "S == ['N', 'S']", "S", "['N', 'S']", "'N'", "'S'", "'Yes'", "'No'", "S = list(sorted(set(input())))", "list(sorted(set(input())))", "S" ]
S = list(sorted(set(input()))) print('Yes' if S == ['E', 'N', 'S', 'W'] or S == ['E', 'W'] or S == ['N', 'S'] else 'No')
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 4, 13, 13, 14, 2, 4, 13, 13, 17, 4, 13, 17, 14, 2, 4, 13, 13, 17, 0, 13, 2, 2, 17, 13, 2, 17, 13, 0, 13, 2, 2, 17, 13, 2, 17, 13, 14, 2, 13, 13, 4, 13, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13, 10, 2, 13, 10, 2, 13 ]
[ [ 59, 2 ], [ 62, 8 ], [ 60, 11 ], [ 63, 16 ], [ 63, 25 ], [ 65, 28 ], [ 63, 32 ], [ 63, 35 ], [ 68, 37 ], [ 63, 41 ], [ 63, 44 ], [ 66, 47 ], [ 69, 48 ], [ 59, 60 ], [ 62, 63 ], [ 65, 66 ], [ 68, 69 ] ]
[ "s=list(input())\nm=set(s)\nif len(m)==4:\n print(\"Yes\")\nelif len(m)==2:\n c1=\"S\" in m and \"N\" in m\n c2=\"W\" in m and \"E\" in m\n if c1 or c2:\n print(\"Yes\")\n else:\n print(\"No\")\nelse:\n print(\"No\")", "s=list(input())", "s", "list(input())", "list", "input()", "input", "m=set(s)", "m", "set(s)", "set", "s", "if len(m)==4:\n print(\"Yes\")\nelif len(m)==2:\n c1=\"S\" in m and \"N\" in m\n c2=\"W\" in m and \"E\" in m\n if c1 or c2:\n print(\"Yes\")\n else:\n print(\"No\")\nelse:\n print(\"No\")", "len(m)==4", "len(m)", "len", "m", "4", "print(\"Yes\")", "print", "\"Yes\"", "elif len(m)==2:\n c1=\"S\" in m and \"N\" in m\n c2=\"W\" in m and \"E\" in m\n if c1 or c2:\n print(\"Yes\")\n else:\n print(\"No\")", "len(m)==2", "len(m)", "len", "m", "2", "c1=\"S\" in m and \"N\" in m", "c1", "\"S\" in m and \"N\" in m", "\"S\" in m", "\"S\"", "m", "\"N\" in m", "\"N\"", "m", "c2=\"W\" in m and \"E\" in m", "c2", "\"W\" in m and \"E\" in m", "\"W\" in m", "\"W\"", "m", "\"E\" in m", "\"E\"", "m", "if c1 or c2:\n print(\"Yes\")\n else:\n print(\"No\")", "c1 or c2", "c1", "c2", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "print(\"No\")", "print", "\"No\"", "s=list(input())", "list(input())", "s", "m=set(s)", "set(s)", "m", "c1=\"S\" in m and \"N\" in m", "\"S\" in m and \"N\" in m", "c1", "c2=\"W\" in m and \"E\" in m", "\"W\" in m and \"E\" in m", "c2" ]
s=list(input()) m=set(s) if len(m)==4: print("Yes") elif len(m)==2: c1="S" in m and "N" in m c2="W" in m and "E" in m if c1 or c2: print("Yes") else: print("No") else: print("No")
[ 7, 15, 0, 13, 4, 13, 4, 13, 14, 2, 2, 2, 2, 2, 2, 17, 13, 2, 17, 13, 40, 17, 13, 40, 17, 13, 2, 2, 2, 40, 17, 13, 40, 17, 13, 2, 17, 13, 2, 17, 13, 2, 2, 2, 2, 17, 13, 2, 17, 13, 2, 17, 13, 2, 17, 13, 4, 13, 17, 4, 13, 17, 10, 4, 13 ]
[ [ 63, 3 ], [ 64, 16 ], [ 64, 19 ], [ 64, 22 ], [ 64, 25 ], [ 64, 31 ], [ 64, 34 ], [ 64, 37 ], [ 64, 40 ], [ 64, 46 ], [ 64, 49 ], [ 64, 52 ], [ 64, 55 ], [ 63, 64 ] ]
[ "from collections import Counter\n\nS = Counter(input())\n\nif \"N\" in S and \"S\" in S and \"E\" not in S and \"W\" not in S or \\\n \"N\" not in S and \"S\" not in S and \"E\" in S and \"W\" in S or \\\n \"N\" in S and \"S\" in S and \"E\" in S and \"W\" in S:\n print(\"Yes\")\nelse:\n print(\"No\")\n ", "from collections import Counter", "S = Counter(input())", "S", "Counter(input())", "Counter", "input()", "input", "if \"N\" in S and \"S\" in S and \"E\" not in S and \"W\" not in S or \\\n \"N\" not in S and \"S\" not in S and \"E\" in S and \"W\" in S or \\\n \"N\" in S and \"S\" in S and \"E\" in S and \"W\" in S:\n print(\"Yes\")\nelse:\n print(\"No\")\n ", "\"N\" in S and \"S\" in S and \"E\" not in S and \"W\" not in S or \\\n \"N\" not in S and \"S\" not in S and \"E\" in S and \"W\" in S or \\\n \"N\" in S and \"S\" in S and \"E\" in S and \"W\" in S", "\"N\" in S and \"S\" in S and \"E\" not in S and \"W\" not in S or \\\n \"N\" not in S and \"S\" not in S and \"E\" in S and \"W\" in S", "\"N\" in S and \"S\" in S and \"E\" not in S and \"W\" not in S", "\"N\" in S and \"S\" in S and \"E\" not in S", "\"N\" in S and \"S\" in S", "\"N\" in S", "\"N\"", "S", "\"S\" in S", "\"S\"", "S", "\"E\" not in S", "\"E\"", "S", "\"W\" not in S", "\"W\"", "S", "\"N\" not in S and \"S\" not in S and \"E\" in S and \"W\" in S", "\"N\" not in S and \"S\" not in S and \"E\" in 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", "\"E\"", "S", "\"W\" in S", "\"W\"", "S", "\"N\" in S and \"S\" in S and \"E\" in S and \"W\" in S", "\"N\" in S and \"S\" in S and \"E\" in S", "\"N\" in S and \"S\" in S", "\"N\" in S", "\"N\"", "S", "\"S\" in S", "\"S\"", "S", "\"E\" in S", "\"E\"", "S", "\"W\" in S", "\"W\"", "S", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "S = Counter(input())", "Counter(input())", "S" ]
from collections import Counter S = Counter(input()) if "N" in S and "S" in S and "E" not in S and "W" not in S or \ "N" not in S and "S" not in S and "E" in S and "W" in S or \ "N" in S and "S" in S and "E" in S and "W" in S: print("Yes") else: print("No")
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 17, 13, 17, 13, 17, 13, 17, 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, 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, 17, 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 ]
[ [ 91, 2 ], [ 82, 8 ], [ 88, 10 ], [ 100, 12 ], [ 85, 14 ], [ 18, 17 ], [ 92, 17 ], [ 17, 21 ], [ 103, 24 ], [ 17, 28 ], [ 97, 31 ], [ 17, 35 ], [ 106, 38 ], [ 94, 41 ], [ 104, 49 ], [ 83, 49 ], [ 95, 52 ], [ 86, 52 ], [ 95, 56 ], [ 86, 56 ], [ 104, 59 ], [ 83, 59 ], [ 98, 63 ], [ 89, 63 ], [ 107, 66 ], [ 101, 66 ], [ 107, 70 ], [ 101, 70 ], [ 98, 73 ], [ 89, 73 ], [ 82, 83 ], [ 85, 86 ], [ 88, 89 ], [ 91, 92 ], [ 94, 95 ], [ 97, 98 ], [ 100, 101 ], [ 103, 104 ], [ 106, 107 ] ]
[ "S = list(input())\nNcnt, Ecnt, Wcnt, Scnt = 0, 0, 0, 0\n\nfor i in S:\n if i == 'N':\n Ncnt += 1\n elif i == 'E':\n Ecnt += 1\n elif i == 'W':\n Wcnt += 1\n else:\n Scnt += 1\n\nif (Ncnt > 0 and Scnt == 0) or (Scnt > 0 and Ncnt == 0) or (Ecnt > 0 and Wcnt == 0) or (Wcnt > 0 and Ecnt == 0):\n print('No')\nelse:\n print('Yes')", "S = list(input())", "S", "list(input())", "list", "input()", "input", "Ncnt, Ecnt, Wcnt, Scnt = 0, 0, 0, 0", "Ncnt", "0", "Ecnt", "0", "Wcnt", "0", "Scnt", "0", "for i in S:\n if i == 'N':\n Ncnt += 1\n elif i == 'E':\n Ecnt += 1\n elif i == 'W':\n Wcnt += 1\n else:\n Scnt += 1", "i", "S", "if i == 'N':\n Ncnt += 1\n elif i == 'E':\n Ecnt += 1\n elif i == 'W':\n Wcnt += 1\n else:\n Scnt += 1", "i == 'N'", "i", "'N'", "Ncnt += 1", "Ncnt", "1", "elif i == 'E':\n Ecnt += 1\n ", "i == 'E'", "i", "'E'", "Ecnt += 1", "Ecnt", "1", "elif i == 'W':\n Wcnt += 1\n ", "i == 'W'", "i", "'W'", "Wcnt += 1", "Wcnt", "1", "Scnt += 1", "Scnt", "1", "if (Ncnt > 0 and Scnt == 0) or (Scnt > 0 and Ncnt == 0) or (Ecnt > 0 and Wcnt == 0) or (Wcnt > 0 and Ecnt == 0):\n print('No')\nelse:\n print('Yes')", "(Ncnt > 0 and Scnt == 0) or (Scnt > 0 and Ncnt == 0) or (Ecnt > 0 and Wcnt == 0) or (Wcnt > 0 and Ecnt == 0)", "(Ncnt > 0 and Scnt == 0) or (Scnt > 0 and Ncnt == 0) or (Ecnt > 0 and Wcnt == 0)", "(Ncnt > 0 and Scnt == 0) or (Scnt > 0 and Ncnt == 0)", "Ncnt > 0 and Scnt == 0", "Ncnt > 0", "Ncnt", "0", "Scnt == 0", "Scnt", "0", "Scnt > 0 and Ncnt == 0", "Scnt > 0", "Scnt", "0", "Ncnt == 0", "Ncnt", "0", "Ecnt > 0 and Wcnt == 0", "Ecnt > 0", "Ecnt", "0", "Wcnt == 0", "Wcnt", "0", "Wcnt > 0 and Ecnt == 0", "Wcnt > 0", "Wcnt", "0", "Ecnt == 0", "Ecnt", "0", "print('No')", "print", "'No'", "print('Yes')", "print", "'Yes'", "Ncnt, Ecnt, Wcnt, Scnt = 0, 0, 0, 0", "0", "Ncnt", "Scnt = 0, 0, 0, 0", "0", "Scnt", "Ecnt, Wcnt, Scnt = 0, 0, 0, 0", "0", "Ecnt", "S = list(input())", "list(input())", "S", "Scnt += 1", "1", "Scnt", "Ecnt += 1", "1", "Ecnt", "Wcnt, Scnt = 0, 0, 0, 0", "0", "Wcnt", "Ncnt += 1", "1", "Ncnt", "Wcnt += 1", "1", "Wcnt" ]
S = list(input()) Ncnt, Ecnt, Wcnt, Scnt = 0, 0, 0, 0 for i in S: if i == 'N': Ncnt += 1 elif i == 'E': Ecnt += 1 elif i == 'W': Wcnt += 1 else: Scnt += 1 if (Ncnt > 0 and Scnt == 0) or (Scnt > 0 and Ncnt == 0) or (Ecnt > 0 and Wcnt == 0) or (Wcnt > 0 and Ecnt == 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, 13, 40, 13, 2, 40, 13, 13, 2, 13, 40, 13, 2, 40, 13, 13, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 66, 2 ], [ 72, 6 ], [ 67, 9 ], [ 60, 13 ], [ 67, 16 ], [ 63, 20 ], [ 67, 23 ], [ 69, 27 ], [ 67, 30 ], [ 73, 38 ], [ 70, 40 ], [ 73, 43 ], [ 70, 44 ], [ 64, 46 ], [ 61, 48 ], [ 64, 51 ], [ 61, 52 ], [ 60, 61 ], [ 63, 64 ], [ 66, 67 ], [ 69, 70 ], [ 72, 73 ] ]
[ "x = input()\nn = x.count('N')\ne = x.count('E')\nw = x.count('W')\ns = x.count('S')\nif ((n and not s) or (not n and s) or (w and not e) or (not w and e)):\n\tprint(\"No\")\nelse:\n\tprint(\"Yes\")", "x = input()", "x", "input()", "input", "n = x.count('N')", "n", "x.count('N')", "x.count", "x", "count", "'N'", "e = x.count('E')", "e", "x.count('E')", "x.count", "x", "count", "'E'", "w = x.count('W')", "w", "x.count('W')", "x.count", "x", "count", "'W'", "s = x.count('S')", "s", "x.count('S')", "x.count", "x", "count", "'S'", "if ((n and not s) or (not n and s) or (w and not e) or (not w and e)):\n\tprint(\"No\")\nelse:\n\tprint(\"Yes\")", "(n and not s) or (not n and s) or (w and not e) or (not w and e)", "(n and not s) or (not n and s) or (w and not e)", "(n and not s) or (not n and s)", "n and not s", "n", "not s", "s", "not n and s", "not n", "n", "s", "w and not e", "w", "not e", "e", "not w and e", "not w", "w", "e", "print(\"No\")", "print", "\"No\"", "print(\"Yes\")", "print", "\"Yes\"", "e = x.count('E')", "x.count('E')", "e", "w = x.count('W')", "x.count('W')", "w", "x = input()", "input()", "x", "s = x.count('S')", "x.count('S')", "s", "n = x.count('N')", "x.count('N')", "n" ]
x = input() n = x.count('N') e = x.count('E') w = x.count('W') s = x.count('S') if ((n and not s) or (not n and s) or (w and not e) or (not w and e)): print("No") else: print("Yes")
[ 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, 2, 13, 17, 2, 13, 17, 2, 2, 2, 13, 17, 2, 13, 17, 2, 2, 13, 13, 17, 2, 2, 2, 13, 13, 17, 2, 2, 2, 13, 17, 2, 13, 17, 2, 2, 13, 13, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 96, 2 ], [ 93, 8 ], [ 97, 11 ], [ 90, 15 ], [ 97, 18 ], [ 84, 22 ], [ 97, 25 ], [ 87, 29 ], [ 97, 32 ], [ 94, 40 ], [ 88, 43 ], [ 91, 48 ], [ 85, 51 ], [ 91, 55 ], [ 85, 56 ], [ 94, 61 ], [ 88, 62 ], [ 91, 67 ], [ 85, 70 ], [ 91, 74 ], [ 85, 75 ], [ 84, 85 ], [ 87, 88 ], [ 90, 91 ], [ 93, 94 ], [ 96, 97 ] ]
[ "#A - Wanna go back home\nS = list(input())\n\nN = S.count('N')\nE = S.count('E')\nW = S.count('W')\ns = S.count('S')\n\nif ((N>0 and s>0) and ((E>0 and W>0) or (E == W == 0))) or ((N == s == 0) and ((E>0 and W>0) or (E == 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'", "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'", "s = S.count('S')", "s", "S.count('S')", "S.count", "S", "count", "'S'", "if ((N>0 and s>0) and ((E>0 and W>0) or (E == W == 0))) or ((N == s == 0) and ((E>0 and W>0) or (E == W == 0))):\n print('Yes')\nelse:\n print('No')", "((N>0 and s>0) and ((E>0 and W>0) or (E == W == 0))) or ((N == s == 0) and ((E>0 and W>0) or (E == W == 0)))", "(N>0 and s>0) and ((E>0 and W>0) or (E == W == 0))", "N>0 and s>0", "N>0", "N", "0", "s>0", "s", "0", "(E>0 and W>0) or (E == W == 0)", "E>0 and W>0", "E>0", "E", "0", "W>0", "W", "0", "E == W == 0", "E == W", "E", "W", "0", "(N == s == 0) and ((E>0 and W>0) or (E == W == 0))", "N == s == 0", "N == s", "N", "s", "0", "(E>0 and W>0) or (E == W == 0)", "E>0 and W>0", "E>0", "E", "0", "W>0", "W", "0", "E == W == 0", "E == W", "E", "W", "0", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "W = S.count('W')", "S.count('W')", "W", "s = S.count('S')", "S.count('S')", "s", "E = S.count('E')", "S.count('E')", "E", "N = S.count('N')", "S.count('N')", "N", "S = list(input())", "list(input())", "S" ]
#A - Wanna go back home S = list(input()) N = S.count('N') E = S.count('E') W = S.count('W') s = S.count('S') if ((N>0 and s>0) and ((E>0 and W>0) or (E == W == 0))) or ((N == s == 0) and ((E>0 and W>0) or (E == W == 0))): 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, 2, 2, 2, 13, 17, 2, 17, 13, 2, 2, 13, 17, 2, 17, 13, 2, 2, 13, 17, 2, 17, 13, 2, 2, 13, 17, 2, 17, 13, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 74, 2 ], [ 86, 8 ], [ 75, 11 ], [ 83, 15 ], [ 75, 18 ], [ 77, 22 ], [ 75, 25 ], [ 80, 29 ], [ 75, 32 ], [ 87, 41 ], [ 78, 45 ], [ 78, 48 ], [ 87, 52 ], [ 81, 55 ], [ 84, 59 ], [ 84, 62 ], [ 81, 66 ], [ 74, 75 ], [ 77, 78 ], [ 80, 81 ], [ 83, 84 ], [ 86, 87 ] ]
[ "S = str(input())\nn = S.count('N')\nw = S.count('W')\ns = S.count('S')\ne = S.count('E')\nif (n == 0 and 0 < s) or (s == 0 and 0 < n) or (e == 0 and 0 < w) or (w == 0 and 0 < e):\n print('No')\nelse:\n print('Yes')", "S = str(input())", "S", "str(input())", "str", "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 == 0 and 0 < s) or (s == 0 and 0 < n) or (e == 0 and 0 < w) or (w == 0 and 0 < e):\n print('No')\nelse:\n print('Yes')", "(n == 0 and 0 < s) or (s == 0 and 0 < n) or (e == 0 and 0 < w) or (w == 0 and 0 < e)", "(n == 0 and 0 < s) or (s == 0 and 0 < n) or (e == 0 and 0 < w)", "(n == 0 and 0 < s) or (s == 0 and 0 < n)", "n == 0 and 0 < s", "n == 0", "n", "0", "0 < s", "0", "s", "s == 0 and 0 < n", "s == 0", "s", "0", "0 < n", "0", "n", "e == 0 and 0 < w", "e == 0", "e", "0", "0 < w", "0", "w", "w == 0 and 0 < e", "w == 0", "w", "0", "0 < e", "0", "e", "print('No')", "print", "'No'", "print('Yes')", "print", "'Yes'", "S = str(input())", "str(input())", "S", "s = S.count('S')", "S.count('S')", "s", "e = S.count('E')", "S.count('E')", "e", "w = S.count('W')", "S.count('W')", "w", "n = S.count('N')", "S.count('N')", "n" ]
S = str(input()) n = S.count('N') w = S.count('W') s = S.count('S') e = S.count('E') if (n == 0 and 0 < s) or (s == 0 and 0 < n) or (e == 0 and 0 < w) or (w == 0 and 0 < e): print('No') else: print('Yes')
[ 7, 0, 13, 4, 13, 0, 13, 17, 13, 17, 0, 13, 17, 13, 17, 14, 2, 17, 13, 14, 2, 17, 13, 0, 13, 17, 14, 2, 17, 13, 14, 2, 17, 13, 0, 13, 17, 14, 2, 17, 13, 14, 2, 17, 13, 0, 13, 17, 14, 2, 17, 13, 14, 2, 17, 13, 0, 13, 17, 14, 2, 40, 17, 13, 40, 17, 13, 0, 13, 17, 13, 17, 14, 2, 40, 17, 13, 40, 17, 13, 0, 13, 17, 13, 17, 14, 2, 2, 2, 2, 13, 17, 2, 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, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 138, 2 ], [ 108, 6 ], [ 114, 8 ], [ 120, 11 ], [ 132, 13 ], [ 139, 18 ], [ 139, 22 ], [ 144, 24 ], [ 139, 29 ], [ 139, 33 ], [ 123, 35 ], [ 139, 40 ], [ 139, 44 ], [ 126, 46 ], [ 139, 51 ], [ 139, 55 ], [ 141, 57 ], [ 139, 63 ], [ 139, 66 ], [ 129, 68 ], [ 135, 70 ], [ 139, 76 ], [ 139, 79 ], [ 111, 81 ], [ 117, 83 ], [ 112, 90 ], [ 145, 90 ], [ 109, 90 ], [ 118, 93 ], [ 124, 93 ], [ 115, 93 ], [ 130, 96 ], [ 127, 96 ], [ 121, 96 ], [ 136, 99 ], [ 142, 99 ], [ 133, 99 ], [ 108, 109 ], [ 111, 112 ], [ 114, 115 ], [ 117, 118 ], [ 120, 121 ], [ 123, 124 ], [ 126, 127 ], [ 129, 130 ], [ 132, 133 ], [ 135, 136 ], [ 138, 139 ], [ 141, 142 ], [ 144, 145 ] ]
[ "n=input()\nans1, ans2=\"No\", \"No\"\nans3, ans4=\"No\", \"No\"\nif 'N' in n:\n if 'S' in n:\n ans1=\"Yes\"\nif 'S' in n:\n if 'N' in n:\n ans2=\"Yes\"\nif 'E' in n:\n if 'W' in n:\n ans3=\"Yes\"\nif 'W' in n:\n if 'E' in n:\n ans4=\"Yes\"\nif \"W\" not in n and \"E\" not in n:\n ans3, ans4 = \"Yes\", \"Yes\"\nif \"N\" not in n and \"S\" not in n:\n ans1, ans2 = \"Yes\", \"Yes\"\nif ans1==\"Yes\" and ans2==\"Yes\" and ans3==\"Yes\" and ans4==\"Yes\":\n print(\"Yes\")\nelse:\n print(\"No\")", "n=input()", "n", "input()", "input", "ans1, ans2=\"No\", \"No\"", "ans1", "\"No\"", "ans2", "\"No\"", "ans3, ans4=\"No\", \"No\"", "ans3", "\"No\"", "ans4", "\"No\"", "if 'N' in n:\n if 'S' in n:\n ans1=\"Yes\"", "'N' in n", "'N'", "n", "if 'S' in n:\n ans1=\"Yes\"", "'S' in n", "'S'", "n", "ans1=\"Yes\"", "ans1", "\"Yes\"", "if 'S' in n:\n if 'N' in n:\n ans2=\"Yes\"", "'S' in n", "'S'", "n", "if 'N' in n:\n ans2=\"Yes\"", "'N' in n", "'N'", "n", "ans2=\"Yes\"", "ans2", "\"Yes\"", "if 'E' in n:\n if 'W' in n:\n ans3=\"Yes\"", "'E' in n", "'E'", "n", "if 'W' in n:\n ans3=\"Yes\"", "'W' in n", "'W'", "n", "ans3=\"Yes\"", "ans3", "\"Yes\"", "if 'W' in n:\n if 'E' in n:\n ans4=\"Yes\"", "'W' in n", "'W'", "n", "if 'E' in n:\n ans4=\"Yes\"", "'E' in n", "'E'", "n", "ans4=\"Yes\"", "ans4", "\"Yes\"", "if \"W\" not in n and \"E\" not in n:\n ans3, ans4 = \"Yes\", \"Yes\"", "\"W\" not in n and \"E\" not in n", "\"W\" not in n", "\"W\"", "n", "\"E\" not in n", "\"E\"", "n", "ans3, ans4 = \"Yes\", \"Yes\"", "ans3", "\"Yes\"", "ans4", "\"Yes\"", "if \"N\" not in n and \"S\" not in n:\n ans1, ans2 = \"Yes\", \"Yes\"", "\"N\" not in n and \"S\" not in n", "\"N\" not in n", "\"N\"", "n", "\"S\" not in n", "\"S\"", "n", "ans1, ans2 = \"Yes\", \"Yes\"", "ans1", "\"Yes\"", "ans2", "\"Yes\"", "if ans1==\"Yes\" and ans2==\"Yes\" and ans3==\"Yes\" and ans4==\"Yes\":\n print(\"Yes\")\nelse:\n print(\"No\")", "ans1==\"Yes\" and ans2==\"Yes\" and ans3==\"Yes\" and ans4==\"Yes\"", "ans1==\"Yes\" and ans2==\"Yes\" and ans3==\"Yes\"", "ans1==\"Yes\" and ans2==\"Yes\"", "ans1==\"Yes\"", "ans1", "\"Yes\"", "ans2==\"Yes\"", "ans2", "\"Yes\"", "ans3==\"Yes\"", "ans3", "\"Yes\"", "ans4==\"Yes\"", "ans4", "\"Yes\"", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "ans1, ans2=\"No\", \"No\"", "\"No\"", "ans1", "ans1, ans2 = \"Yes\", \"Yes\"", "\"Yes\"", "ans1", "ans2=\"No\", \"No\"", "\"No\"", "ans2", "ans2 = \"Yes\", \"Yes\"", "\"Yes\"", "ans2", "ans3, ans4=\"No\", \"No\"", "\"No\"", "ans3", "ans2=\"Yes\"", "\"Yes\"", "ans2", "ans3=\"Yes\"", "\"Yes\"", "ans3", "ans3, ans4 = \"Yes\", \"Yes\"", "\"Yes\"", "ans3", "ans4=\"No\", \"No\"", "\"No\"", "ans4", "ans4 = \"Yes\", \"Yes\"", "\"Yes\"", "ans4", "n=input()", "input()", "n", "ans4=\"Yes\"", "\"Yes\"", "ans4", "ans1=\"Yes\"", "\"Yes\"", "ans1" ]
n=input() ans1, ans2="No", "No" ans3, ans4="No", "No" if 'N' in n: if 'S' in n: ans1="Yes" if 'S' in n: if 'N' in n: ans2="Yes" if 'E' in n: if 'W' in n: ans3="Yes" if 'W' in n: if 'E' in n: ans4="Yes" if "W" not in n and "E" not in n: ans3, ans4 = "Yes", "Yes" if "N" not in n and "S" not in n: ans1, ans2 = "Yes", "Yes" if ans1=="Yes" and ans2=="Yes" and ans3=="Yes" and ans4=="Yes": print("Yes") else: print("No")
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 28, 13, 4, 13, 4, 13, 13, 4, 18, 13, 13, 18, 13, 13, 14, 2, 4, 13, 13, 17, 4, 13, 17, 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 ]
[ [ 76, 2 ], [ 79, 6 ], [ 11, 10 ], [ 77, 15 ], [ 80, 18 ], [ 77, 21 ], [ 10, 22 ], [ 80, 27 ], [ 80, 36 ], [ 80, 45 ], [ 80, 51 ], [ 80, 54 ], [ 80, 62 ], [ 80, 65 ], [ 76, 77 ], [ 79, 80 ] ]
[ "S=input()\nt=set()\nfor i in range(len(S)):\n t.add(S[i])\nif len(t)==4:\n print('Yes')\nelif len(t)==3:\n print('No')\nelif len(t)==2:\n if 'N' in t and 'S' in t:\n print('Yes')\n elif 'W' in t and 'E' in t:\n print('Yes')\n else:\n print('No')\nelse:\n print('No')", "S=input()", "S", "input()", "input", "t=set()", "t", "set()", "set", "for i in range(len(S)):\n t.add(S[i])", "i", "range(len(S))", "range", "len(S)", "len", "S", "t.add(S[i])", "t.add", "t", "add", "S[i]", "S", "i", "if len(t)==4:\n print('Yes')\nelif len(t)==3:\n print('No')\nelif len(t)==2:\n if 'N' in t and 'S' in t:\n print('Yes')\n elif 'W' in t and 'E' in t:\n print('Yes')\n else:\n print('No')\nelse:\n print('No')", "len(t)==4", "len(t)", "len", "t", "4", "print('Yes')", "print", "'Yes'", "elif len(t)==3:\n print('No')", "len(t)==3", "len(t)", "len", "t", "3", "print('No')", "print", "'No'", "elif len(t)==2:\n if 'N' in t and 'S' in t:\n print('Yes')\n elif 'W' in t and 'E' in t:\n print('Yes')\n else:\n print('No')", "len(t)==2", "len(t)", "len", "t", "2", "if 'N' in t and 'S' in t:\n print('Yes')\n elif 'W' in t and 'E' in t:\n print('Yes')\n else:\n print('No')", "'N' in t and 'S' in t", "'N' in t", "'N'", "t", "'S' in t", "'S'", "t", "print('Yes')", "print", "'Yes'", "elif 'W' in t and 'E' in t:\n print('Yes')\n ", "'W' in t and 'E' in t", "'W' in t", "'W'", "t", "'E' in t", "'E'", "t", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "print('No')", "print", "'No'", "S=input()", "input()", "S", "t=set()", "set()", "t" ]
S=input() t=set() for i in range(len(S)): t.add(S[i]) if len(t)==4: print('Yes') elif len(t)==3: print('No') elif len(t)==2: if 'N' in t and 'S' in t: print('Yes') elif 'W' in t and 'E' in t: print('Yes') else: print('No') else: print('No')
[ 7, 15, 13, 0, 13, 12, 4, 18, 4, 18, 18, 13, 13, 13, 13, 4, 18, 13, 13, 2, 17, 17, 12, 13, 23, 13, 13, 12, 13, 23, 13, 13, 12, 13, 23, 13, 13, 15, 12, 13, 0, 13, 4, 13, 41, 28, 13, 17, 4, 2, 13, 13, 0, 13, 13, 14, 2, 2, 18, 13, 17, 18, 13, 17, 2, 18, 13, 17, 18, 13, 17, 4, 13, 17, 29, 4, 13, 17, 4, 13, 10, 12, 13, 10, 12, 13, 10, 12, 13, 10, 12, 13, 10, 12, 13 ]
[ [ 90, 4 ], [ 26, 25 ], [ 31, 30 ], [ 36, 35 ], [ 42, 41 ], [ 91, 43 ], [ 47, 46 ], [ 46, 50 ], [ 41, 51 ], [ 54, 53 ], [ 53, 59 ], [ 53, 62 ], [ 53, 66 ], [ 53, 69 ], [ 82, 79 ], [ 90, 91 ] ]
[ "#print#!/usr/bin/env python3\n#%% for atcoder uniittest use\nimport sys\ninput= lambda: sys.stdin.readline().rstrip()\nsys.setrecursionlimit(10**9)\ndef pin(type=int):return map(type,input().split())\ndef tupin(t=int):return tuple(pin(t))\ndef lispin(t=int):return list(pin(t))\n#%%code\nfrom collections import Counter\ndef resolve():\n S=input()\n a=[s in S for s in\"NSEW\"]\n if a[0]==a[1] and a[2]==a[3]:\n print(\"Yes\")\n return\n print(\"No\")\n #print()\n#%%submit!\nresolve()", "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(10**9)", "sys.setrecursionlimit", "sys", "setrecursionlimit", "10**9", "10", "9", "def pin(type=int):return map(type,input().split())", "pin", "type=int", "type", "int", "def tupin(t=int):return tuple(pin(t))", "tupin", "t=int", "t", "int", "def lispin(t=int):return list(pin(t))\n#%%code", "lispin", "t=int", "t", "int", "from collections import Counter", "def resolve():\n S=input()\n a=[s in S for s in\"NSEW\"]\n if a[0]==a[1] and a[2]==a[3]:\n print(\"Yes\")\n return\n print(\"No\")\n #print()\n#%%submit!", "resolve", "S=input()", "S", "input()", "input", "s in S for s in\"NSEW\"", "for s in\"NSEW\"", "s", "\"NSEW\"", "for s in\"NSEW\"", "s in S", "s", "S", "a=[s in S for s in\"NSEW\"]", "a", "[s in S for s in\"NSEW\"]", "if a[0]==a[1] and a[2]==a[3]:\n print(\"Yes\")\n return\n ", "a[0]==a[1] and a[2]==a[3]", "a[0]==a[1]", "a[0]", "a", "0", "a[1]", "a", "1", "a[2]==a[3]", "a[2]", "a", "2", "a[3]", "a", "3", "print(\"Yes\")", "print", "\"Yes\"", "return", "print(\"No\")", "print", "\"No\"", "resolve()", "resolve", "def resolve():\n S=input()\n a=[s in S for s in\"NSEW\"]\n if a[0]==a[1] and a[2]==a[3]:\n print(\"Yes\")\n return\n print(\"No\")\n #print()\n#%%submit!", "def resolve():\n S=input()\n a=[s in S for s in\"NSEW\"]\n if a[0]==a[1] and a[2]==a[3]:\n print(\"Yes\")\n return\n print(\"No\")\n #print()\n#%%submit!", "resolve", "def tupin(t=int):return tuple(pin(t))", "def tupin(t=int):return tuple(pin(t))", "tupin", "def lispin(t=int):return list(pin(t))\n#%%code", "def lispin(t=int):return list(pin(t))\n#%%code", "lispin", "input= lambda: sys.stdin.readline().rstrip()", "lambda: sys.stdin.readline().rstrip()", "input", "def pin(type=int):return map(type,input().split())", "def pin(type=int):return map(type,input().split())", "pin" ]
#print#!/usr/bin/env python3 #%% for atcoder uniittest use import sys input= lambda: sys.stdin.readline().rstrip() sys.setrecursionlimit(10**9) def pin(type=int):return map(type,input().split()) def tupin(t=int):return tuple(pin(t)) def lispin(t=int):return list(pin(t)) #%%code from collections import Counter def resolve(): S=input() a=[s in S for s in"NSEW"] if a[0]==a[1] and a[2]==a[3]: print("Yes") return print("No") #print() #%%submit! resolve()
[ 7, 0, 13, 4, 13, 0, 13, 17, 0, 13, 17, 14, 2, 17, 13, 0, 13, 17, 14, 2, 17, 13, 0, 13, 17, 14, 2, 17, 13, 0, 13, 17, 14, 2, 17, 13, 0, 13, 17, 14, 2, 2, 13, 13, 17, 4, 13, 17, 4, 13, 17, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 17, 13, 10, 4, 13, 10, 17, 13, 10, 17, 13 ]
[ [ 64, 2 ], [ 52, 6 ], [ 61, 9 ], [ 65, 14 ], [ 70, 16 ], [ 65, 21 ], [ 58, 23 ], [ 65, 28 ], [ 67, 30 ], [ 65, 35 ], [ 55, 37 ], [ 59, 42 ], [ 71, 42 ], [ 53, 42 ], [ 56, 43 ], [ 68, 43 ], [ 62, 43 ], [ 52, 53 ], [ 55, 56 ], [ 58, 59 ], [ 61, 62 ], [ 64, 65 ], [ 67, 68 ], [ 70, 71 ] ]
[ "s = input()\nc = 0\nd = 0\nif 'W' in s:\n c += 1\nif 'E' in s:\n c -= 1\nif 'N' in s:\n d += 1\nif 'S' in s:\n d -= 1\nif c == d == 0:\n print('Yes')\nelse:\n print('No')", "s = input()", "s", "input()", "input", "c = 0", "c", "0", "d = 0", "d", "0", "if 'W' in s:\n c += 1", "'W' in s", "'W'", "s", "c += 1", "c", "1", "if 'E' in s:\n c -= 1", "'E' in s", "'E'", "s", "c -= 1", "c", "1", "if 'N' in s:\n d += 1", "'N' in s", "'N'", "s", "d += 1", "d", "1", "if 'S' in s:\n d -= 1", "'S' in s", "'S'", "s", "d -= 1", "d", "1", "if c == d == 0:\n print('Yes')\nelse:\n print('No')", "c == d == 0", "c == d", "c", "d", "0", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "c = 0", "0", "c", "d -= 1", "1", "d", "c -= 1", "1", "c", "d = 0", "0", "d", "s = input()", "input()", "s", "d += 1", "1", "d", "c += 1", "1", "c" ]
s = input() c = 0 d = 0 if 'W' in s: c += 1 if 'E' in s: c -= 1 if 'N' in s: d += 1 if 'S' in s: d -= 1 if c == d == 0: print('Yes') else: print('No')
[ 7, 0, 13, 4, 13, 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, 2, 18, 13, 17, 18, 13, 17, 2, 18, 13, 17, 18, 13, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 2, 13 ]
[ [ 69, 2 ], [ 72, 6 ], [ 13, 12 ], [ 70, 12 ], [ 12, 16 ], [ 22, 19 ], [ 73, 20 ], [ 12, 25 ], [ 31, 28 ], [ 73, 29 ], [ 12, 34 ], [ 40, 37 ], [ 73, 38 ], [ 45, 42 ], [ 73, 43 ], [ 73, 50 ], [ 73, 53 ], [ 73, 57 ], [ 73, 60 ], [ 69, 70 ], [ 72, 73 ] ]
[ "s = input()\nnwse = [0]*4\nfor i in s:\n if i==\"N\":\n nwse[0] =1\n elif i==\"W\":\n nwse[1] =1\n elif i==\"S\":\n nwse[2]=1\n else:\n nwse[3]=1\n \n \nif nwse[0]==nwse[2] and nwse[1]==nwse[3]:\n print(\"Yes\")\nelse:\n print(\"No\")", "s = input()", "s", "input()", "input", "nwse = [0]*4", "nwse", "[0]*4", "[0]", "0", "4", "for i in s:\n if i==\"N\":\n nwse[0] =1\n elif i==\"W\":\n nwse[1] =1\n elif i==\"S\":\n nwse[2]=1\n else:\n nwse[3]=1\n \n ", "i", "s", "if i==\"N\":\n nwse[0] =1\n elif i==\"W\":\n nwse[1] =1\n elif i==\"S\":\n nwse[2]=1\n else:\n nwse[3]=1\n \n ", "i==\"N\"", "i", "\"N\"", "nwse[0] =1", "nwse[0]", "nwse", "0", "1", "elif i==\"W\":\n nwse[1] =1\n ", "i==\"W\"", "i", "\"W\"", "nwse[1] =1", "nwse[1]", "nwse", "1", "1", "elif i==\"S\":\n nwse[2]=1\n ", "i==\"S\"", "i", "\"S\"", "nwse[2]=1", "nwse[2]", "nwse", "2", "1", "nwse[3]=1", "nwse[3]", "nwse", "3", "1", "if nwse[0]==nwse[2] and nwse[1]==nwse[3]:\n print(\"Yes\")\nelse:\n print(\"No\")", "nwse[0]==nwse[2] and nwse[1]==nwse[3]", "nwse[0]==nwse[2]", "nwse[0]", "nwse", "0", "nwse[2]", "nwse", "2", "nwse[1]==nwse[3]", "nwse[1]", "nwse", "1", "nwse[3]", "nwse", "3", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "s = input()", "input()", "s", "nwse = [0]*4", "[0]*4", "nwse" ]
s = input() nwse = [0]*4 for i in s: if i=="N": nwse[0] =1 elif i=="W": nwse[1] =1 elif i=="S": nwse[2]=1 else: nwse[3]=1 if nwse[0]==nwse[2] and nwse[1]==nwse[3]: 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, 2, 2, 2, 13, 17, 40, 13, 17, 2, 2, 13, 17, 40, 13, 17, 2, 2, 13, 17, 40, 13, 17, 2, 2, 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 ]
[ [ 86, 2 ], [ 77, 8 ], [ 87, 11 ], [ 83, 15 ], [ 87, 18 ], [ 80, 22 ], [ 87, 25 ], [ 74, 29 ], [ 87, 32 ], [ 78, 41 ], [ 81, 44 ], [ 81, 48 ], [ 78, 51 ], [ 84, 55 ], [ 75, 58 ], [ 75, 62 ], [ 84, 65 ], [ 74, 75 ], [ 77, 78 ], [ 80, 81 ], [ 83, 84 ], [ 86, 87 ] ]
[ "s = str(input())\na = s.count(\"N\")\nb = s.count(\"W\")\nc = s.count(\"S\")\nd = s.count(\"E\")\nif (a == 0 and c != 0) or (c == 0 and a != 0) or (b == 0 and d != 0) or (d == 0 and b != 0):\n print(\"No\")\nelse:\n print(\"Yes\")", "s = str(input())", "s", "str(input())", "str", "input()", "input", "a = s.count(\"N\")", "a", "s.count(\"N\")", "s.count", "s", "count", "\"N\"", "b = s.count(\"W\")", "b", "s.count(\"W\")", "s.count", "s", "count", "\"W\"", "c = s.count(\"S\")", "c", "s.count(\"S\")", "s.count", "s", "count", "\"S\"", "d = s.count(\"E\")", "d", "s.count(\"E\")", "s.count", "s", "count", "\"E\"", "if (a == 0 and c != 0) or (c == 0 and a != 0) or (b == 0 and d != 0) or (d == 0 and b != 0):\n print(\"No\")\nelse:\n print(\"Yes\")", "(a == 0 and c != 0) or (c == 0 and a != 0) or (b == 0 and d != 0) or (d == 0 and b != 0)", "(a == 0 and c != 0) or (c == 0 and a != 0) or (b == 0 and d != 0)", "(a == 0 and c != 0) or (c == 0 and a != 0)", "a == 0 and c != 0", "a == 0", "a", "0", "c != 0", "c", "0", "c == 0 and a != 0", "c == 0", "c", "0", "a != 0", "a", "0", "b == 0 and d != 0", "b == 0", "b", "0", "d != 0", "d", "0", "d == 0 and b != 0", "d == 0", "d", "0", "b != 0", "b", "0", "print(\"No\")", "print", "\"No\"", "print(\"Yes\")", "print", "\"Yes\"", "d = s.count(\"E\")", "s.count(\"E\")", "d", "a = s.count(\"N\")", "s.count(\"N\")", "a", "c = s.count(\"S\")", "s.count(\"S\")", "c", "b = s.count(\"W\")", "s.count(\"W\")", "b", "s = str(input())", "str(input())", "s" ]
s = str(input()) a = s.count("N") b = s.count("W") c = s.count("S") d = s.count("E") if (a == 0 and c != 0) or (c == 0 and a != 0) or (b == 0 and d != 0) or (d == 0 and b != 0): print("No") else: print("Yes")
[ 7, 0, 13, 4, 13, 0, 13, 21, 22, 17, 17, 22, 17, 17, 22, 17, 17, 22, 17, 17, 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, 4, 13, 17, 10, 4, 13, 10, 21, 13 ]
[ [ 51, 2 ], [ 54, 6 ], [ 22, 21 ], [ 52, 21 ], [ 27, 24 ], [ 55, 25 ], [ 21, 26 ], [ 55, 32 ], [ 55, 35 ], [ 55, 39 ], [ 55, 42 ], [ 51, 52 ], [ 54, 55 ] ]
[ "S = input()\nNEWS = {'N':0, 'E':0, 'W':0, 'S':0}\nfor char in S:\n NEWS[char] = 1\nif NEWS['N']^NEWS['S'] | NEWS['E']^NEWS['W']:\n print(\"No\")\nelse:\n print(\"Yes\")", "S = input()", "S", "input()", "input", "NEWS = {'N':0, 'E':0, 'W':0, 'S':0}", "NEWS", "{'N':0, 'E':0, 'W':0, 'S':0}", "'N'", "'N'", "0", "'E'", "'E'", "0", "'W'", "'W'", "0", "'S'", "'S'", "0", "for char in S:\n NEWS[char] = 1", "char", "S", "NEWS[char] = 1", "NEWS[char]", "NEWS", "char", "1", "if NEWS['N']^NEWS['S'] | NEWS['E']^NEWS['W']:\n print(\"No\")\nelse:\n print(\"Yes\")", "NEWS['N']^NEWS['S'] | NEWS['E']^NEWS['W']", "NEWS['N']^NEWS['S']", "NEWS['N']", "NEWS", "'N'", "NEWS['S']", "NEWS", "'S'", "NEWS['E']^NEWS['W']", "NEWS['E']", "NEWS", "'E'", "NEWS['W']", "NEWS", "'W'", "print(\"No\")", "print", "\"No\"", "print(\"Yes\")", "print", "\"Yes\"", "S = input()", "input()", "S", "NEWS = {'N':0, 'E':0, 'W':0, 'S':0}", "{'N':0, 'E':0, 'W':0, 'S':0}", "NEWS" ]
S = input() NEWS = {'N':0, 'E':0, 'W':0, 'S':0} for char in S: NEWS[char] = 1 if NEWS['N']^NEWS['S'] | NEWS['E']^NEWS['W']: print("No") else: print("Yes")
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 28, 13, 13, 4, 18, 13, 13, 13, 14, 2, 2, 17, 13, 2, 17, 13, 14, 2, 2, 2, 17, 13, 2, 17, 13, 2, 40, 2, 17, 13, 40, 2, 17, 13, 4, 13, 17, 4, 13, 17, 14, 2, 2, 17, 13, 2, 17, 13, 14, 2, 40, 2, 17, 13, 40, 2, 17, 13, 4, 13, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 4, 13 ]
[ [ 80, 2 ], [ 77, 6 ], [ 11, 10 ], [ 81, 10 ], [ 78, 14 ], [ 10, 16 ], [ 78, 21 ], [ 78, 24 ], [ 78, 30 ], [ 78, 33 ], [ 78, 38 ], [ 78, 42 ], [ 78, 53 ], [ 78, 56 ], [ 78, 62 ], [ 78, 66 ], [ 77, 78 ], [ 80, 81 ] ]
[ "s = input()\ndirset = set()\nfor i in s:\n dirset.add(i)\nif \"N\" in dirset and \"S\" in dirset:\n if (\"E\" in dirset and \"W\" in dirset) or (not \"E\" in dirset and not \"W\" in dirset):\n print(\"Yes\")\n else:\n print(\"No\")\nelif \"E\" in dirset and \"W\" in dirset:\n if not \"N\" in dirset and not \"S\" in dirset:\n print(\"Yes\")\n else:\n print(\"No\")\nelse:\n print(\"No\")", "s = input()", "s", "input()", "input", "dirset = set()", "dirset", "set()", "set", "for i in s:\n dirset.add(i)", "i", "s", "dirset.add(i)", "dirset.add", "dirset", "add", "i", "if \"N\" in dirset and \"S\" in dirset:\n if (\"E\" in dirset and \"W\" in dirset) or (not \"E\" in dirset and not \"W\" in dirset):\n print(\"Yes\")\n else:\n print(\"No\")\nelif \"E\" in dirset and \"W\" in dirset:\n if not \"N\" in dirset and not \"S\" in dirset:\n print(\"Yes\")\n else:\n print(\"No\")\nelse:\n print(\"No\")", "\"N\" in dirset and \"S\" in dirset", "\"N\" in dirset", "\"N\"", "dirset", "\"S\" in dirset", "\"S\"", "dirset", "if (\"E\" in dirset and \"W\" in dirset) or (not \"E\" in dirset and not \"W\" in dirset):\n print(\"Yes\")\n else:\n print(\"No\")", "(\"E\" in dirset and \"W\" in dirset) or (not \"E\" in dirset and not \"W\" in dirset)", "\"E\" in dirset and \"W\" in dirset", "\"E\" in dirset", "\"E\"", "dirset", "\"W\" in dirset", "\"W\"", "dirset", "not \"E\" in dirset and not \"W\" in dirset", "not \"E\" in dirset", "\"E\" in dirset", "\"E\"", "dirset", "not \"W\" in dirset", "\"W\" in dirset", "\"W\"", "dirset", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "elif \"E\" in dirset and \"W\" in dirset:\n if not \"N\" in dirset and not \"S\" in dirset:\n print(\"Yes\")\n else:\n print(\"No\")", "\"E\" in dirset and \"W\" in dirset", "\"E\" in dirset", "\"E\"", "dirset", "\"W\" in dirset", "\"W\"", "dirset", "if not \"N\" in dirset and not \"S\" in dirset:\n print(\"Yes\")\n else:\n print(\"No\")", "not \"N\" in dirset and not \"S\" in dirset", "not \"N\" in dirset", "\"N\" in dirset", "\"N\"", "dirset", "not \"S\" in dirset", "\"S\" in dirset", "\"S\"", "dirset", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "print(\"No\")", "print", "\"No\"", "dirset = set()", "set()", "dirset", "s = input()", "input()", "s" ]
s = input() dirset = set() for i in s: dirset.add(i) if "N" in dirset and "S" in dirset: if ("E" in dirset and "W" in dirset) or (not "E" in dirset and not "W" in dirset): print("Yes") else: print("No") elif "E" in dirset and "W" in dirset: if not "N" in dirset and not "S" in dirset: print("Yes") else: print("No") else: print("No")
[ 7, 0, 13, 4, 13, 4, 13, 4, 13, 4, 13, 8, 2, 40, 4, 18, 13, 13, 17, 4, 18, 13, 13, 17, 40, 4, 18, 13, 13, 17, 4, 18, 13, 13, 17, 17, 17, 10, 4, 13 ]
[ [ 38, 2 ], [ 39, 16 ], [ 39, 21 ], [ 39, 27 ], [ 39, 32 ], [ 38, 39 ] ]
[ "s= list(set(input()))\nprint('No' if s.count('N')!=s.count('S') or s.count(\"W\") !=s.count('E') else 'Yes')", "s= list(set(input()))", "s", "list(set(input()))", "list", "set(input())", "set", "input()", "input", "print('No' if s.count('N')!=s.count('S') or s.count(\"W\") !=s.count('E') else 'Yes')", "print", "'No' if s.count('N')!=s.count('S') or s.count(\"W\") !=s.count('E') else 'Yes'", "s.count('N')!=s.count('S') or s.count(\"W\") !=s.count('E')", "s.count('N')!=s.count('S')", "s.count('N')", "s.count", "s", "count", "'N'", "s.count('S')", "s.count", "s", "count", "'S'", "s.count(\"W\") !=s.count('E')", "s.count(\"W\")", "s.count", "s", "count", "\"W\"", "s.count('E')", "s.count", "s", "count", "'E'", "'No'", "'Yes'", "s= list(set(input()))", "list(set(input()))", "s" ]
s= list(set(input())) print('No' if s.count('N')!=s.count('S') or s.count("W") !=s.count('E') else '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, 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, 8, 13, 10, 8, 13, 10, 8, 13, 10, 8, 13, 10, 4, 13, 10, 4, 13 ]
[ [ 125, 2 ], [ 128, 6 ], [ 126, 9 ], [ 116, 11 ], [ 129, 15 ], [ 126, 15 ], [ 129, 18 ], [ 126, 18 ], [ 119, 23 ], [ 129, 27 ], [ 126, 27 ], [ 129, 30 ], [ 126, 30 ], [ 113, 35 ], [ 129, 39 ], [ 126, 39 ], [ 129, 42 ], [ 126, 42 ], [ 122, 47 ], [ 129, 51 ], [ 126, 51 ], [ 129, 54 ], [ 126, 54 ], [ 123, 65 ], [ 120, 68 ], [ 117, 71 ], [ 114, 74 ], [ 117, 80 ], [ 114, 83 ], [ 123, 86 ], [ 120, 89 ], [ 117, 95 ], [ 114, 98 ], [ 123, 101 ], [ 120, 104 ], [ 113, 114 ], [ 116, 117 ], [ 119, 120 ], [ 122, 123 ], [ 125, 126 ], [ 128, 129 ] ]
[ "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 (west != 0 and east != 0 and sowth == 0 and north == 0) or\\\n (sowth != 0 and north != 0 and west == 0 and east == 0) or\\\n (sowth != 0 and north != 0 and west != 0 and east != 0):\n print('Yes')\nelse:\n print('No')", "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 (west != 0 and east != 0 and sowth == 0 and north == 0) or\\\n (sowth != 0 and north != 0 and west == 0 and east == 0) or\\\n (sowth != 0 and north != 0 and west != 0 and east != 0):\n print('Yes')\nelse:\n print('No')", "(west != 0 and east != 0 and sowth == 0 and north == 0) or\\\n (sowth != 0 and north != 0 and west == 0 and east == 0) or\\\n (sowth != 0 and north != 0 and west != 0 and east != 0)", "(west != 0 and east != 0 and sowth == 0 and north == 0) or\\\n (sowth != 0 and north != 0 and west == 0 and east == 0)", "west != 0 and east != 0 and sowth == 0 and north == 0", "west != 0 and east != 0 and sowth == 0", "west != 0 and east != 0", "west != 0", "west", "0", "east != 0", "east", "0", "sowth == 0", "sowth", "0", "north == 0", "north", "0", "sowth != 0 and north != 0 and west == 0 and east == 0", "sowth != 0 and north != 0 and west == 0", "sowth != 0 and north != 0", "sowth != 0", "sowth", "0", "north != 0", "north", "0", "west == 0", "west", "0", "east == 0", "east", "0", "sowth != 0 and north != 0 and west != 0 and east != 0", "sowth != 0 and north != 0 and west != 0", "sowth != 0 and north != 0", "sowth != 0", "sowth", "0", "north != 0", "north", "0", "west != 0", "west", "0", "east != 0", "east", "0", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "north = s.count('N') if 'N' in s else 0", "s.count('N') if 'N' in s else 0", "north", "sowth = s.count('S') if 'S' in s else 0", "s.count('S') if 'S' in s else 0", "sowth", "east = s.count('E') if 'E' in s else 0", "s.count('E') if 'E' in s else 0", "east", "west = s.count('W') if 'W' in s else 0", "s.count('W') if 'W' in s else 0", "west", "s = input()", "input()", "s", "s = list(s)", "list(s)", "s" ]
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 (west != 0 and east != 0 and sowth == 0 and north == 0) or\ (sowth != 0 and north != 0 and west == 0 and east == 0) or\ (sowth != 0 and north != 0 and west != 0 and east != 0): 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, 14, 2, 2, 2, 2, 13, 13, 17, 2, 2, 13, 17, 2, 13, 17, 2, 2, 2, 13, 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 ]
[ [ 77, 2 ], [ 68, 6 ], [ 78, 9 ], [ 74, 13 ], [ 78, 16 ], [ 80, 20 ], [ 78, 23 ], [ 71, 27 ], [ 78, 30 ], [ 69, 38 ], [ 75, 39 ], [ 69, 43 ], [ 75, 46 ], [ 81, 51 ], [ 72, 52 ], [ 81, 56 ], [ 72, 59 ], [ 68, 69 ], [ 71, 72 ], [ 74, 75 ], [ 77, 78 ], [ 80, 81 ] ]
[ "S = input()\nn = S.count(\"N\")\ns = S.count(\"S\")\nw = S.count(\"W\")\ne = S.count(\"E\")\nif (n == s == 0 or (n > 0 and s > 0)) and (w == e == 0 or (w > 0 and e > 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\"", "if (n == s == 0 or (n > 0 and s > 0)) and (w == e == 0 or (w > 0 and e > 0)):\n print(\"Yes\")\nelse:\n print(\"No\")", "(n == s == 0 or (n > 0 and s > 0)) and (w == e == 0 or (w > 0 and e > 0))", "n == s == 0 or (n > 0 and s > 0)", "n == s == 0", "n == s", "n", "s", "0", "n > 0 and s > 0", "n > 0", "n", "0", "s > 0", "s", "0", "w == e == 0 or (w > 0 and e > 0)", "w == e == 0", "w == e", "w", "e", "0", "w > 0 and e > 0", "w > 0", "w", "0", "e > 0", "e", "0", "print(\"Yes\")", "print", "\"Yes\"", "print(\"No\")", "print", "\"No\"", "n = S.count(\"N\")", "S.count(\"N\")", "n", "e = S.count(\"E\")", "S.count(\"E\")", "e", "s = S.count(\"S\")", "S.count(\"S\")", "s", "S = input()", "input()", "S", "w = S.count(\"W\")", "S.count(\"W\")", "w" ]
S = input() n = S.count("N") s = S.count("S") w = S.count("W") e = S.count("E") if (n == s == 0 or (n > 0 and s > 0)) and (w == e == 0 or (w > 0 and e > 0)): print("Yes") else: print("No")
[ 7, 0, 13, 4, 13, 4, 13, 0, 13, 39, 17, 17, 0, 13, 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, 14, 2, 2, 2, 4, 13, 13, 17, 17, 2, 2, 4, 13, 13, 17, 17, 4, 13, 17, 4, 13, 17, 10, 4, 13, 10, 39, 13, 10, 39, 13 ]
[ [ 85, 2 ], [ 88, 8 ], [ 91, 13 ], [ 19, 18 ], [ 86, 23 ], [ 86, 27 ], [ 18, 28 ], [ 34, 31 ], [ 92, 32 ], [ 86, 38 ], [ 18, 39 ], [ 45, 42 ], [ 89, 43 ], [ 86, 49 ], [ 18, 50 ], [ 56, 53 ], [ 92, 54 ], [ 61, 58 ], [ 89, 59 ], [ 89, 68 ], [ 92, 75 ], [ 85, 86 ], [ 88, 89 ], [ 91, 92 ] ]
[ "s = list(input())\nwe = [0,0]\nns = [0,0]\n\nfor i in range(len(s)):\n if s[i] == ('N'):\n ns[0] = 1\n elif s[i] == ('W'):\n we[0] = 1\n elif s[i] == ('S'):\n ns[1] = 1\n else:\n we[1] = 1\n\nif sum(we) % 2 == 0 and sum(ns) % 2 == 0:\n print('Yes')\nelse:\n print('No')", "s = list(input())", "s", "list(input())", "list", "input()", "input", "we = [0,0]", "we", "[0,0]", "0", "0", "ns = [0,0]", "ns", "[0,0]", "0", "0", "for i in range(len(s)):\n if s[i] == ('N'):\n ns[0] = 1\n elif s[i] == ('W'):\n we[0] = 1\n elif s[i] == ('S'):\n ns[1] = 1\n else:\n we[1] = 1", "i", "range(len(s))", "range", "len(s)", "len", "s", "if s[i] == ('N'):\n ns[0] = 1\n elif s[i] == ('W'):\n we[0] = 1\n elif s[i] == ('S'):\n ns[1] = 1\n else:\n we[1] = 1", "s[i] == ('N')", "s[i]", "s", "i", "'N'", "ns[0] = 1", "ns[0]", "ns", "0", "1", "elif s[i] == ('W'):\n we[0] = 1\n ", "s[i] == ('W')", "s[i]", "s", "i", "'W'", "we[0] = 1", "we[0]", "we", "0", "1", "elif s[i] == ('S'):\n ns[1] = 1\n ", "s[i] == ('S')", "s[i]", "s", "i", "'S'", "ns[1] = 1", "ns[1]", "ns", "1", "1", "we[1] = 1", "we[1]", "we", "1", "1", "if sum(we) % 2 == 0 and sum(ns) % 2 == 0:\n print('Yes')\nelse:\n print('No')", "sum(we) % 2 == 0 and sum(ns) % 2 == 0", "sum(we) % 2 == 0", "sum(we) % 2", "sum(we)", "sum", "we", "2", "0", "sum(ns) % 2 == 0", "sum(ns) % 2", "sum(ns)", "sum", "ns", "2", "0", "print('Yes')", "print", "'Yes'", "print('No')", "print", "'No'", "s = list(input())", "list(input())", "s", "we = [0,0]", "[0,0]", "we", "ns = [0,0]", "[0,0]", "ns" ]
s = list(input()) we = [0,0] ns = [0,0] for i in range(len(s)): if s[i] == ('N'): ns[0] = 1 elif s[i] == ('W'): we[0] = 1 elif s[i] == ('S'): ns[1] = 1 else: we[1] = 1 if sum(we) % 2 == 0 and sum(ns) % 2 == 0: print('Yes') else: print('No')
[ 7, 0, 13, 4, 13, 0, 13, 4, 13, 4, 13, 13, 14, 2, 4, 18, 13, 13, 17, 17, 14, 2, 4, 18, 13, 13, 17, 17, 4, 13, 17, 4, 13, 14, 2, 4, 18, 13, 13, 17, 17, 14, 2, 4, 18, 13, 13, 17, 17, 4, 13, 17, 4, 13, 14, 2, 4, 18, 13, 13, 17, 17, 14, 2, 4, 18, 13, 13, 17, 17, 4, 13, 17, 4, 13, 14, 2, 4, 18, 13, 13, 17, 17, 14, 2, 4, 18, 13, 13, 17, 17, 4, 13, 17, 4, 13, 4, 13, 17, 10, 4, 13, 10, 4, 13 ]
[ [ 100, 2 ], [ 103, 6 ], [ 101, 11 ], [ 104, 16 ], [ 101, 16 ], [ 104, 24 ], [ 101, 24 ], [ 104, 37 ], [ 101, 37 ], [ 104, 45 ], [ 101, 45 ], [ 104, 58 ], [ 101, 58 ], [ 104, 66 ], [ 101, 66 ], [ 104, 79 ], [ 101, 79 ], [ 104, 87 ], [ 101, 87 ], [ 100, 101 ], [ 103, 104 ] ]
[ "S=input()\nS=sorted(set(S))\nif S.count(\"N\")==1:\n\tif S.count(\"S\")==0:\n\t\tprint(\"No\")\n\t\texit()\nif S.count(\"S\")==1:\n\tif S.count(\"N\")==0:\n\t\tprint(\"No\")\n\t\texit()\nif S.count(\"E\")==1:\n\tif S.count(\"W\")==0:\n\t\tprint(\"No\")\n\t\texit()\nif S.count(\"W\")==1:\n\tif S.count(\"E\")==0:\n\t\tprint(\"No\")\n\t\texit()\nprint(\"Yes\")", "S=input()", "S", "input()", "input", "S=sorted(set(S))", "S", "sorted(set(S))", "sorted", "set(S)", "set", "S", "if S.count(\"N\")==1:\n\tif S.count(\"S\")==0:\n\t\tprint(\"No\")\n\t\texit()", "S.count(\"N\")==1", "S.count(\"N\")", "S.count", "S", "count", "\"N\"", "1", "if S.count(\"S\")==0:\n\t\tprint(\"No\")\n\t\texit()", "S.count(\"S\")==0", "S.count(\"S\")", "S.count", "S", "count", "\"S\"", "0", "print(\"No\")", "print", "\"No\"", "exit()", "exit", "if S.count(\"S\")==1:\n\tif S.count(\"N\")==0:\n\t\tprint(\"No\")\n\t\texit()", "S.count(\"S\")==1", "S.count(\"S\")", "S.count", "S", "count", "\"S\"", "1", "if S.count(\"N\")==0:\n\t\tprint(\"No\")\n\t\texit()", "S.count(\"N\")==0", "S.count(\"N\")", "S.count", "S", "count", "\"N\"", "0", "print(\"No\")", "print", "\"No\"", "exit()", "exit", "if S.count(\"E\")==1:\n\tif S.count(\"W\")==0:\n\t\tprint(\"No\")\n\t\texit()", "S.count(\"E\")==1", "S.count(\"E\")", "S.count", "S", "count", "\"E\"", "1", "if S.count(\"W\")==0:\n\t\tprint(\"No\")\n\t\texit()", "S.count(\"W\")==0", "S.count(\"W\")", "S.count", "S", "count", "\"W\"", "0", "print(\"No\")", "print", "\"No\"", "exit()", "exit", "if S.count(\"W\")==1:\n\tif S.count(\"E\")==0:\n\t\tprint(\"No\")\n\t\texit()", "S.count(\"W\")==1", "S.count(\"W\")", "S.count", "S", "count", "\"W\"", "1", "if S.count(\"E\")==0:\n\t\tprint(\"No\")\n\t\texit()", "S.count(\"E\")==0", "S.count(\"E\")", "S.count", "S", "count", "\"E\"", "0", "print(\"No\")", "print", "\"No\"", "exit()", "exit", "print(\"Yes\")", "print", "\"Yes\"", "S=input()", "input()", "S", "S=sorted(set(S))", "sorted(set(S))", "S" ]
S=input() S=sorted(set(S)) if S.count("N")==1: if S.count("S")==0: print("No") exit() if S.count("S")==1: if S.count("N")==0: print("No") exit() if S.count("E")==1: if S.count("W")==0: print("No") exit() if S.count("W")==1: if S.count("E")==0: print("No") exit() print("Yes")