import collections



S = eval(input())



c = collections.Counter(S)

K = list(c.keys())



if len(K) == 4:

    print('Yes')

elif len(K) == 2:

    if 'N' in K and 'S' in K:

        print('Yes')

    elif 'W' in K and 'E' in K:

        print('Yes')

    else:

        print('No')

else:

    print('No')
*S, = eval(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')
import collections

S = eval(input())
c = collections.Counter(S)
K = list(c.keys())
if len(K) == 4:
    print("Yes")
elif len(K) == 2:
    if "N" in K and "S" in K:
        print("Yes")
    elif "W" in K and "E" in K:
        print("Yes")
    else:
        print("No")
else:
    print("No")

(*S,) = eval(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")

-import collections - -S = eval(input()) -c = collections.Counter(S) -K = list(c.keys()) -if len(K) == 4: +(*S,) = eval(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: -elif len(K) == 2: -    if "N" in K and "S" in K: -        print("Yes") -    elif "W" in K and "E" in K: -        print("Yes") -    else: -        print("No")