#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  int sx, sy, ex, ey;
  cin >> t >> sx >> sy >> ex >> ey;
  string str;
  cin >> str;
  int dx = ex - sx;
  int dy = ey - sy;
  char tmpx, tmpy;
  int i1;
  int i2;
  int map[4] = {0, 0, 0, 0};
  if (dx > 0) {
    map[0] = dx;
    tmpx = 'E';
    i1 = 0;
  }
  if (dx < 0) {
    map[1] = -dx;
    tmpx = 'W';
    i1 = 1;
  }
  if (dy > 0) {
    map[2] = dy;
    tmpy = 'N';
    i2 = 2;
  }
  if (dy < 0) {
    map[3] = -dy;
    tmpy = 'S';
    i2 = 3;
  }
  int i = 0;
  for (i = 0; i < t; i++) {
    if (map[i1] == 0 && map[i2] == 0) break;
    if (str[i] == tmpx && map[i1] != 0) map[i1]--;
    if (str[i] == tmpy && map[i2] != 0) map[i2]--;
  }
  if (map[i1] == 0 && map[i2] == 0)
    cout << i << endl;
  else
    cout << -1 << endl;
  return 0;
}
