node_ids
listlengths
4
1.4k
edge_index
listlengths
1
2.22k
text
listlengths
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 ], [ 4...
[ "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\"...
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, ...
[ [ 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 ], [ ...
[ "#-*-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\") ...
#-*-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_d...
[ 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...
[ [ 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 ], [ ...
[ "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()"...
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,...
[ [ 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 ], [ ...
[ "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') >=...
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, ...
[ [ 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 ], [ ...
[ "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()...
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, ...
[ [ 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 ], [ ...
[ "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 ...
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') ...
[ 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 ], [ 4...
[ "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", "...
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, ...
[ [ 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, 1...
[ "#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,defa...
#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,Cou...
[ 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, ...
[ [ 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'...
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...
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, ...
[ [ 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,...
[ "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", "[]",...
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, ...
[ [ 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 ], [ 7...
[ "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 = 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 = 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...
[ [ 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 ],...
[ "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 lengt...
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 > ...
[ 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...
[ [ 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 ], [ ...
[ "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 = Fal...
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 ...
[ 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, ...
[ [ 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 ]...
[ "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 ...
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] = co...
[ 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,...
[ [ 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 ],...
[ "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 ...
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 itemgette...
[ 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...
[ [ 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 ...
[ "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 p...
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\...
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, 2...
[ [ 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':Fals...
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, ...
[ [ 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...
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: ...
[ 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...
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, ...
[ [ 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 ], [ 6...
[ "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"...
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, ...
[ [ 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()\nel...
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, ...
[ [ 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 ], [ ...
[ "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", "r...
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, 1...
[ [ 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 ], [ ...
[ "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]...
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, ...
[ [ 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 ]...
[ "#! /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 = default...
#! /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 ...
[ 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\...
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,...
[ [ 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...
[ "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...
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...
[ 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", "...
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...
[ [ 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 ], [ ...
[ "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", "s...
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, ...
[ [ 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 ], [ ...
[ "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 el...
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'): ...
[ 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, ...
[ [ 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 ]...
[ "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...
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'] == ...
[ 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, ...
[ [ 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 ], [ ...
[ "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]", "...
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", "inp...
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, ...
[ [ 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 ], [ ...
[ "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' i...
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: ...
[ 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, 1...
[ [ 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 ], ...
[ "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 pr...
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,...
[ [ 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, ...
[ "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 prin...
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__': ...
[ 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, ...
[ [ 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 ], [ 7...
[ "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('...
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, ...
[ [ 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 ], [ ...
[ "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 ...
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: ...
[ 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, ...
[ [ 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 ], [ 5...
[ "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...
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 prin...
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, ...
[ [ 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 ], [ ...
[ "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')", ...
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, ...
[ [ 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 ], [ ...
[ "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",...
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, ...
[ [ 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())...
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...
[ [ 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 ], [ 4...
[ "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", "i...
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 r...
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...
[ "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\"...
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,...
[ [ 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, 10...
[ "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\") >=...
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("Y...
[ 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 ], [ 4...
[ "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=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...
[ [ 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=l...
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...
[ [ 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 ], [ ...
[ "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):\...
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...
[ 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...
[ [ 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 ], [ ...
[ "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(...
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, ...
[ [ 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 ], [ ...
[ "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()", "in...
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(li...
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, ...
[ [ 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 ], [ ...
[ "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", "...
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, ...
[ [ 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...
[ "# 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 ...
# 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' ...
[ 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...
[ [ 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 ], [ 4...
[ "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"...
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, ...
[ [ 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 ], [ ...
[ "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 = 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 = ...
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 ], [ ...
[ "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 ...
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...
[ [ 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 ], [ 7...
[ "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() 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, 1...
[ [ 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())) 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, ...
[ [ 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 ], [ ...
[ "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()))...
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, ...
[ [ 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 ...
[ "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...
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 cn...
[ 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,...
[ [ 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 ],...
[ "\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...
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 ...
[ 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,...
[ [ 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 ], [ 6...
[ "*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('N...
*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'...
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, ...
[ [ 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 ], ...
[ "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 an...
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...
[ 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[...
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, ...
[ [ 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 ], [ ...
[ "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\"",...
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,...
[ [ 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 ], [ ...
[ "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()) 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,...
[ [ 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 ], [ ...
[ "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", ...
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 collectio...
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, ...
[ [ 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 ], [ ...
[ "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() 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,...
[ [ 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 ], [ 7...
[ "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(...
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...
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,...
[ [ 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\") ...
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: pri...
[ 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 ...
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, ...
[ [ 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 ], ...
[ "# 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())\n...
# 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(*...
[ 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 = 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,...
[ [ 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 ], [ ...
[ "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...
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, ...
[ [ 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 ], [ ...
[ "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\")\...
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, ...
[ [ 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 ], [ ...
[ "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 ...
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): ...
[ 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, ...
[ [ 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 ], [ 6...
[ "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", ...
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,...
[ [ 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 ], [ ...
[ "#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(...
#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,...
[ [ 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 ], [ ...
[ "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.cou...
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...
[ [ 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 ...
[ "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 = \"...
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...
[ 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, ...
[ [ 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 ], [ ...
[ "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...
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,...
[ [ 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 ], [ ...
[ "#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 Cou...
#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 resol...
[ 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,...
[ [ 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 ], [ 5...
[ "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 = 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, ...
[ [ 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 ], [ ...
[ "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", "nws...
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, 1...
[ [ 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 ], [ ...
[ "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()", "...
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,...
[ [ 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}", ...
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, 1...
[ [ 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 ], [ ...
[ "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 n...
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") ...
[ 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 'Ye...
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, 1...
[ [ 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 ...
[ "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 ==...
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\ (so...
[ 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,...
[ [ 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 ], [ 8...
[ "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 = 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, ...
[ [ 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 ], [ ...
[ "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()) 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, ...
[ [ 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 ...
[ "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\...
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")