#include <bits/stdc++.h>
using namespace std;
vector<bool> mark(100000000, false);
int prime[8000000];
int nprime;
void sieve(int n) {
  int limit = sqrt(n * 1.0) + 1, s = 0;
  nprime = 0;
  mark[1] = true;
  mark[2] = false;
  prime[nprime++] = 2;
  for (int i = 4; i <= n; i += 2) mark[i] = true;
  for (int i = 3; i <= n; i += 2) {
    if (!mark[i]) {
      prime[nprime++] = i;
      if (i <= limit) {
        for (int j = i * i; j <= n; j += i * 2) {
          mark[j] = true;
        }
      }
    }
  }
  for (int i = 1; i <= nprime; i += 100) cout << prime[i - 1] << endl;
}
long long int l1[100005], l2[1005], vis[100005], s = 0, m;
long long int dx[] = {1, 0, -1, 0};
long long int dy[] = {0, -1, 0, 1};
long long int arr[200005];
long long int tree[200005];
void update(long long int idx, long long int val, long long int n) {
  while (idx <= n) {
    tree[idx] += val;
    idx += (idx & -idx);
  }
}
int read(long long int idx) {
  long long int sum = 0;
  while (idx > 0) {
    sum += tree[idx];
    idx -= (idx & -idx);
  }
  return sum;
}
vector<long long int> v[100005];
set<long long int> v2;
map<long long int, long long int> m2;
vector<pair<long long int, long long int>> p2;
void dfs(int a) {
  if (vis[a]) return;
  vis[a] = 1;
  if (!v[a].size()) {
    s++;
    return;
  }
  for (int i = 0; i < v[a].size(); i++) {
    if (!vis[v[a][i]] && l1[a] + l1[v[a][i]] <= m) dfs(v[a][i]);
  }
}
int main() {
  long long int t, i, q, n, k, l, c, d, p, nl, np, a, e, b,
      x2 = -1, x1 = 1000000005, x3 = 0, x4 = 0, x5 = 0, x6 = 0, x8 = 0;
  double x10 = 0;
  char x11;
  string s2, s3, s4, s5, s6, s7;
  cin >> t >> q >> n >> k >> l;
  cin >> s2;
  d = k - q;
  p = l - n;
  if (d > 0)
    x3 = d;
  else if (d < 0)
    x4 = abs(d);
  if (p > 0)
    x5 = p;
  else if (p < 0)
    x6 = abs(p);
  for (int i = 0; i < s2.size(); i++) {
    if (s2[i] == 'S') {
      if (x6 != 0) x6 -= 1;
    } else if (s2[i] == 'E') {
      if (x3 != 0) x3--;
    } else if (s2[i] == 'W') {
      if (x4 != 0) x4 -= 1;
    } else if (s2[i] == 'N') {
      if (x5 != 0) x5 -= 1;
    }
    if (!x3 && !x4 && !x5 && !x6) {
      cout << i + 1;
      return 0;
    }
  }
  cout << -1;
  return 0;
}
