#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t, sx, sy, ex, ey;
  cin >> t >> sx >> sy >> ex >> ey;
  char map[100002];
  for (int i = 1; i <= t; i++) {
    cin >> map[i];
  }
  long long int x = sx, y = sy;
  int time = 0;
  int flag = 0;
  for (int i = 1; i <= t; i++) {
    if (map[i] == 'N') {
      time++;
      if (y < ey) {
        y++;
      }
      if (x == ex && y == ey) break;
    } else if (map[i] == 'S') {
      time++;
      if (y > ey) y--;
      if (x == ex && y == ey) break;
    } else if (map[i] == 'E') {
      time++;
      if (x < ex) x++;
      if (x == ex && y == ey) break;
    } else if (map[i] == 'W') {
      time++;
      if (x > ex) x--;
      if (x == ex && y == ey) break;
    }
  }
  if (x == ex && y == ey)
    cout << time << endl;
  else
    cout << "-1" << endl;
  return 0;
}
