#include <bits/stdc++.h>
using namespace std;
long long const N = 200005;
long double const EPS = (1e-7);
long long const MOD = 1e9 + 7;
long double const PI = acos(-1.0L);
long long GCD(long long a, long long b) { return (b == 0 ? a : GCD(b, a % b)); }
long long LCM(long long a, long long b) { return (a * b / GCD(a, b)); }
long long POW(long long a, long long b) {
  return (b == 0 ? 1
                 : (!b & 1 ? POW(a, b / 2) * POW(a, b / 2) % MOD
                           : POW(a, b - 1) * (a % MOD) % MOD));
}
long long DCMP(long double x, long double y) {
  return fabs(x - y) <= EPS ? 0 : x < y ? -1 : 1;
}
long long CEIL(long long x, long long y) { return (x + y - 1) / y; }
long long TC = 1, n, m, ans, res, sum, a, b, c, d, x, y, z, k, l, r, q;
int A[N], B[N], C[N], D[N], L[N], R[N], X[N], Y[N], Q[N];
bool F[N], f;
string S[N], s, T[N], t;
int con(char c) {
  if (c == 'E') return 0;
  if (c == 'S') return 1;
  if (c == 'W') return 2;
  if (c == 'N') return 3;
}
void ud(char c) {
  if (c == 'E') a += 1;
  if (c == 'S') b -= 1;
  if (c == 'W') a -= 1;
  if (c == 'N') b += 1;
}
bool bol[4];
int main() {
  ios::sync_with_stdio(NULL), cin.tie(NULL), cout.tie(NULL);
  while (TC--) {
    cin >> n >> a >> b >> x >> y >> s;
    for (int i = 0; i < n; i++) {
      if (a == x && b == y) return cout << i << '\n', 0;
      if (a < x)
        bol[0] = 1, bol[2] = 0;
      else if (a > x)
        bol[0] = 0, bol[2] = 1;
      else
        bol[0] = 0, bol[2] = 0;
      if (b < y)
        bol[1] = 0, bol[3] = 1;
      else if (b > y)
        bol[1] = 1, bol[3] = 0;
      else
        bol[1] = bol[3] = 0;
      if (bol[con(s[i])]) ud(s[i]);
    }
    if (a == x && b == y) return cout << n << '\n', 0;
    cout << -1 << '\n';
  }
  return 0;
}
