The polar bears are going fishing. They plan to sail from (*s*<sub class="lower-index">*x*</sub>, *s*<sub class="lower-index">*y*</sub>) to (*e*<sub class="lower-index">*x*</sub>, *e*<sub class="lower-index">*y*</sub>). However, the boat can only sail by wind. At each second, the wind blows in one of these directions: east, south, west or north. Assume the boat is currently at (*x*, *y*).
 -  If the wind blows to the east, the boat will move to (*x* + 1, *y*). -  If the wind blows to the south, the boat will move to (*x*, *y* - 1). -  If the wind blows to the west, the boat will move to (*x* - 1, *y*). -  If the wind blows to the north, the boat will move to (*x*, *y* + 1). 
Alternatively, they can hold the boat by the anchor. In this case, the boat stays at (*x*, *y*). Given the wind direction for *t* seconds, what is the earliest time they sail to (*e*<sub class="lower-index">*x*</sub>, *e*<sub class="lower-index">*y*</sub>)?
The first line contains five integers *t*, *s*<sub class="lower-index">*x*</sub>, *s*<sub class="lower-index">*y*</sub>, *e*<sub class="lower-index">*x*</sub>, *e*<sub class="lower-index">*y*</sub> (1 ≤ *t* ≤ 10<sup class="upper-index">5</sup>,  - 10<sup class="upper-index">9</sup> ≤ *s*<sub class="lower-index">*x*</sub>, *s*<sub class="lower-index">*y*</sub>, *e*<sub class="lower-index">*x*</sub>, *e*<sub class="lower-index">*y*</sub> ≤ 10<sup class="upper-index">9</sup>). The starting location and the ending location will be different.

The second line contains *t* characters, the *i*-th character is the wind blowing direction at the *i*-th second. It will be one of the four possibilities: "E" (east), "S" (south), "W" (west) and "N" (north).
# from sys import exit
# def pos_finder(a,h,o,c,s):
#     i=0
#     while i < (len(a)):
#         if h[0]!=0:
#             if  h[0]>0:
#                 for j in range(len(a)):
#                     if a[j]==' ':
#                         a[j]=='p'
#                         c[0]=c[0]+j
#                         break
#         i=i+1
# def neg_finder(a,h,o,c,s):
#     i=0
#     while i < (len(a)):
#         if h[0]!=0:
#             if  h[0]>0:
#                 for j in range(len(a)):
#                     if a[j]==' ':
#                         a[j]=='p'
#                         c[0]=c[0]+j
#                         break
#         i=i+1

from sys import exit
b=[int(x) for x in input().split()]
n=b[0]
b=b[1:]
#print(a)
a=list(input())
if b[-1]-b[1] >0 :
    if  b[-1]-b[1] > a.count('N'):
        print(-1) 
        exit()  
elif b[-1]-b[1] <0 : 
    if  abs(b[-1]-b[1]) > a.count('S'):
        print(-1)
        exit()
if b[0]-b[2] >0 :
    if   b[0]-b[2] > a.count('W'):
        print(-1 )
        exit()
elif b[0]-b[2] <0 : 
    if  abs(b[0]-b[2]) > a.count('E'):
        print(-1 )
        exit()  
c=[0,0]
h=[int(b[2]-b[0]),int(b[-1]-b[1])]
#print(h)
i=0
if i==0:

    if h[1]>=0:
        while h[1]>0:
            for j in range(len(a)):
                if a[j]=='N':
                    h[1]=h[1]-1
                    c[1]=c[1]+j
                    #print(j)
    elif h[1]<=0:
        while h[1]<0:
            for j in range(len(a)):
                if a[j]=='S':
                    h[1]=h[1]+1
                    c[1]=c[1]+j
    if h[0]>=0:
        while h[0]>0:
            for j in range(len(a)):
                if a[j]=='E':
                    h[0]=h[0]-1
                    c[0]=c[0]+j
    elif h[0]<=0:
        while h[0]<0:
            for j in range(len(a)):
                if a[j]=='W':
                    h[0]=h[0]+1
                    c[0]=c[0]+j 
  

print(max(c)+1)
