#include <bits/stdc++.h>
using namespace std;
void solve() {
  long int t, sx, sy, ex, ey;
  cin >> t >> sx >> sy >> ex >> ey;
  string s;
  cin >> s;
  long int nr = 0, sr = 0, er = 0, wr = 0;
  if (sx > ex) {
    wr = sx - ex;
  } else {
    er = ex - sx;
  }
  if (sy > ey) {
    sr = sy - ey;
  } else {
    nr = ey - sy;
  }
  long int cn = 0, cs = 0, ce = 0, cw = 0;
  long int ans = -1;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == 'W') {
      cw++;
    }
    if (s[i] == 'E') {
      ce++;
    }
    if (s[i] == 'N') {
      cn++;
    }
    if (s[i] == 'S') {
      cs++;
    }
    if (cs >= sr && cn >= nr && ce >= er && cw >= wr) {
      ans = i + 1;
      break;
    }
  }
  cout << ans << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t;
  solve();
  return 0;
}
