#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, x1, y1, x2, y2, i, x, y, W = 0, E = 0, S = 0, N = 0;
  vector<char> a;
  cin >> t >> x1 >> y1 >> x2 >> y2;
  a.resize(t);
  for (i = 0; i < t; i++) cin >> a[i];
  x = abs(x1 - x2);
  y = abs(y1 - y2);
  if (x2 > x1) E += x;
  if (x2 < x1) W += x;
  if (y2 > y1) N += y;
  if (y2 < y1) S += y;
  if ((E == 0) && (W == 0) && (S == 0) && (N == 0)) {
    cout << "1";
    return 0;
  }
  for (i = 0; i < t; i++) {
    if (a[i] == 'W' && W > 0) W--;
    if (a[i] == 'E' && E > 0) E--;
    if (a[i] == 'N' && N > 0) N--;
    if (a[i] == 'S' && S > 0) S--;
    if ((E == 0) && (W == 0) && (S == 0) && (N == 0)) {
      cout << i + 1;
      return 0;
    }
  }
  cout << "-1";
  return 0;
}
