#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, x1, y1, x, y, mx = 0;
  char xx = 'a', yy = 'a';
  string s;
  cin >> t >> x1 >> y1 >> x >> y >> s;
  x -= x1;
  y -= y1;
  if (x < 0)
    xx = 'W';
  else
    xx = 'E';
  if (y < 0)
    yy = 'S';
  else
    yy = 'N';
  x = abs(x);
  y = abs(y);
  for (int i = 0; i < t; i++) {
    if (s[i] == xx && x) {
      mx = i + 1;
      x--;
    } else if (s[i] == yy && y) {
      mx = i + 1;
      y--;
    }
  }
  if (x == 0 && y == 0)
    cout << mx;
  else
    cout << -1;
  return 0;
}
