s = set(list(eval(input())))

ans = 'Yes'

if 'N' in s and not 'S' in s or 'S' in s and not 'N' in s:

    ans = 'No'

elif 'W' in s and not 'E' in s or 'E' in s and not 'W' in s:

    ans = 'No'

print(ans)
s = set(list(eval(input())))

ans = 'Yes'

if ('N' in s)!=('S' in s):ans = 'No'

elif ('W' in s)!=('E' in s):ans = 'No'

print(ans)
s = set(list(eval(input())))
ans = "Yes"
if "N" in s and not "S" in s or "S" in s and not "N" in s:
    ans = "No"
elif "W" in s and not "E" in s or "E" in s and not "W" in s:
    ans = "No"
print(ans)

s = set(list(eval(input())))
ans = "Yes"
if ("N" in s) != ("S" in s):
    ans = "No"
elif ("W" in s) != ("E" in s):
    ans = "No"
print(ans)

-if "N" in s and not "S" in s or "S" in s and not "N" in s: +if ("N" in s) != ("S" in s): -elif "W" in s and not "E" in s or "E" in s and not "W" in s: +elif ("W" in s) != ("E" in s):