a=list(eval(input()))



n = 0



s = 0



e = 0



w = 0



for i in a:

  if i == 'N':

    n += 1

  elif i == 'S':

    s += 1

  elif i == 'E':

    e += 1

  elif i == 'W':

    w += 1



if n > 0 and s == 0 or n == 0 and s > 0 or e > 0 and w == 0 or e == 0 and w > 0:

  print('No')

else:

  print('Yes')
s= list(eval(input()))

s=set(s)

if len(s)%2==1:

    print('No')

else:

    if len(s) == 2:

        if "W" in s and "E" in s or "S" in s and "N" in s:

            print("Yes")

        else:

            print('No')

    else:

        print('Yes')

a = list(eval(input()))
n = 0
s = 0
e = 0
w = 0
for i in a:
    if i == "N":
        n += 1
    elif i == "S":
        s += 1
    elif i == "E":
        e += 1
    elif i == "W":
        w += 1
if n > 0 and s == 0 or n == 0 and s > 0 or e > 0 and w == 0 or e == 0 and w > 0:
    print("No")
else:
    print("Yes")

s = list(eval(input()))
s = set(s)
if len(s) % 2 == 1:
    print("No")
else:
    if len(s) == 2:
        if "W" in s and "E" in s or "S" in s and "N" in s:
            print("Yes")
        else:
            print("No")
    else:
        print("Yes")

-a = list(eval(input())) -n = 0 -s = 0 -e = 0 -w = 0 -for i in a: -    if i == "N": -        n += 1 -    elif i == "S": -        s += 1 -    elif i == "E": -        e += 1 -    elif i == "W": -        w += 1 -if n > 0 and s == 0 or n == 0 and s > 0 or e > 0 and w == 0 or e == 0 and w > 0: +s = list(eval(input())) +s = set(s) +if len(s) % 2 == 1: -    print("Yes") +    if len(s) == 2: +        if "W" in s and "E" in s or "S" in s and "N" in s: +            print("Yes") +        else: +            print("No") +    else: +        print("Yes")