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")
0275136767b7cb477fb54cbfc7d3d335e42e6d4e
<mask token>

<mask token>
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')

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')

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")