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).
#!/usr/bin/env python
# coding: utf-8

# In[204]:


# # n = int(input())
# # line = list(map(int, input().split()))
# # line = list(str(input()))


# In[296]:


from collections import Counter


# In[313]:


line1 = list(map(int, input().split()))
directions = list(str(input()))


# In[314]:


t, s_x, s_y, e_x, e_y = line1[0], line1[1], line1[2], line1[3], line1[4]


# In[317]:


dir_dict = Counter(directions)
diff_x, diff_y = e_x - s_x, e_y - s_y


# In[327]:


keys = [0, 0]
keys[0] = 'E' if diff_x > 0 else 'W'
keys[1] = 'N' if diff_y > 0 else 'S'
diff_x = abs(diff_x)
diff_y = abs(diff_y)
timer = 0

if diff_x < dir_dict[keys[0]] or diff_y < dir_dict[keys[1]]:
    print("-1")

else:
    for wind in directions:
        if diff_x <= 0 and diff_y <= 0:
            print(timer)
            break
        
        timer += 1
        if wind == keys[0]:
            diff_x -= 1
        elif wind == keys[1]:
            diff_y -= 1
    


# In[ ]:





# In[ ]:





# In[ ]:





# In[ ]:





# In[ ]:





# In[ ]:





# In[ ]:





# In[ ]:





# In[ ]:




