#include <bits/stdc++.h>
using namespace std;
const int maxN = 111111;
char a[maxN];
int n, sx, sy, fx, fy, d, r, w, e, N, s;
int main() {
  cin >> n >> sx >> sy >> fx >> fy;
  cin >> a;
  if (sx == fx && sy == fy) {
    cout << 0;
    return 0;
  }
  d = abs(sx - fx);
  r = abs(fy - sy);
  if (sx <= fx && sy <= fy) {
    for (int i = 0; i < n; i++) {
      if (a[i] == 'E') e++;
      if (a[i] == 'N') N++;
      if (e >= d && N >= r) {
        cout << i + 1;
        return 0;
      }
    }
  } else if (sx <= fx && sy >= fy) {
    for (int i = 0; i < n; i++) {
      if (a[i] == 'E') e++;
      if (a[i] == 'S') s++;
      if (e >= d && s >= r) {
        cout << i + 1;
        return 0;
      }
    }
  } else if (sx >= fx && sy <= fy) {
    for (int i = 0; i < n; i++) {
      if (a[i] == 'W') w++;
      if (a[i] == 'N') N++;
      if (w >= d && N >= r) {
        cout << i + 1;
        return 0;
      }
    }
  } else if (sx >= fx && sy >= fy) {
    for (int i = 0; i < n; i++) {
      if (a[i] == 'W') w++;
      if (a[i] == 'S') s++;
      if (w >= d && s >= r) {
        cout << i + 1;
        return 0;
      }
    }
  }
  cout << -1;
}
