#include <bits/stdc++.h>
using namespace std;
struct classcomp {
  bool operator()(const pair<int, int>& l, const pair<int, int>& r) const {
    if (l.first != r.first) return (l.first < r.first);
    return (l.second < r.second);
  }
} objcomp;
int main() {
  ios::sync_with_stdio();
  cin.tie(0);
  int t, sx, sy, ex, ey, nl = 0, sl = 0, el = 0, wl = 0;
  cin >> t >> sx >> sy >> ex >> ey;
  int dx = ex - sx, dy = ey - sy, res = 0;
  while (t--) {
    res++;
    char c;
    cin >> c;
    switch (c) {
      case 'N':
        nl++;
        break;
      case 'S':
        sl--;
        break;
      case 'E':
        el++;
        break;
      case 'W':
        wl--;
        break;
      default:
        break;
    }
    if (dx >= wl && dx <= el && dy >= sl && dy <= nl) {
      cout << res;
      break;
    }
  }
  if (t == -1) cout << -1;
  return 0;
}
