#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t, sx, sy, ex, ey, k = 0;
  char *p, x;
  cin >> t >> sx >> sy >> ex >> ey;
  p = new char[t];
  for (int i = 0; i < t; i++) cin >> p[i];
  while (sx != ex || sy != ey) {
    if (k >= t) {
      cout << -1;
      return 0;
    }
    x = p[k];
    switch (x) {
      case 'E':
        if (sx < ex) {
          sx += 1;
        }
        break;
      case 'S':
        if (sy > ey) {
          sy -= 1;
        }
        break;
      case 'W':
        if (sx > ex) {
          sx -= 1;
        }
        break;
      case 'N':
        if (sy < ey) {
          sy += 1;
        }
        break;
    }
    if (sx == ex && sy == ey) {
      cout << k + 1;
      return 0;
    }
    k++;
  }
}
