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).
import sys
import os
from collections import Counter, defaultdict, deque
from heapq import heapify, heappush, heappop
from functools import lru_cache
from math import floor, ceil, sqrt, gcd
from string import ascii_lowercase
from math import gcd
from bisect import bisect_left, bisect, bisect_right


def __perform_setup__():
    INPUT_FILE_PATH = "/Users/osama/Desktop/Competitive Programming/input.txt"
    OUTPUT_FILE_PATH = "/Users/osama/Desktop/Competitive Programming/output.txt"

    sys.stdin = open(INPUT_FILE_PATH, 'r')
    sys.stdout = open(OUTPUT_FILE_PATH, 'w')


if "MY_COMPETITIVE_PROGRAMMING_VARIABLE" in os.environ:
    __perform_setup__()


def read():
    return input().strip()


def read_int():
    return int(read())


def read_str_list():
    return read().split()


def read_numeric_list():
    return list(map(int, read_str_list()))


def solve(N, c_x, c_y, e_x, e_y, wind):
    ans = 0
    wind_changes = {
        "E": [1, 0],
        "W": [-1, 0],
        "N": [0, 1],
        "S": [0, -1]
    }

    for ch in wind:
        if c_x == e_x and c_y == e_y:
            break

        d_x, d_y = wind_changes[ch]
        n_x, n_y = d_x + c_x, d_y + c_y

        if abs(n_x - e_x) <= abs(c_x - e_x) and abs(n_y - e_y) <= abs(c_y - e_y):
            c_x += d_x
            c_y += d_y

        ans += 1

    if c_x == e_x and c_y == e_y:
        return ans

    return -1


N, s_x, s_y, e_x, e_y = read_numeric_list()
wind = read()

print(solve(N, s_x, s_y, e_x, e_y, wind))
