S = eval(input())



if (("N" in S and "S" in S) 

or("N" not in S and "S" not in S)):

    if (("E" in S and "W" in S)

    or ("E" not in S and "W" not in S)):

        print('Yes')

        exit()

print('No')
S = eval(input())



if ((("N" in S and "S" in S) 

or("N" not in S and "S" not in S))

and(("E" in S and "W" in S)

or ("E" not in S and "W" not in S))):

    print('Yes')

else:

    print('No')
S = eval(input())
if ("N" in S and "S" in S) or ("N" not in S and "S" not in S):
    if ("E" in S and "W" in S) or ("E" not in S and "W" not in S):
        print("Yes")
        exit()
print("No")

S = eval(input())
if (("N" in S and "S" in S) or ("N" not in S and "S" not in S)) and (
    ("E" in S and "W" in S) or ("E" not in S and "W" not in S)
):
    print("Yes")
else:
    print("No")

-if ("N" in S and "S" in S) or ("N" not in S and "S" not in S): -    if ("E" in S and "W" in S) or ("E" not in S and "W" not in S): -        print("Yes") -        exit() -print("No") +if (("N" in S and "S" in S) or ("N" not in S and "S" not in S)) and ( +    ("E" in S and "W" in S) or ("E" not in S and "W" not in S) +): +    print("Yes") +else: +    print("No")