#include <bits/stdc++.h>
using namespace std;
const long long int M = 1000003;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t, sx, sy, ex, ey;
  cin >> t >> sx >> sy >> ex >> ey;
  long long int yaxis = ey - sy;
  long long int xaxis = ex - sx;
  long long int nreq = 0;
  long long int sreq = 0;
  long long int ereq = 0;
  long long int wreq = 0;
  if (yaxis > 0) {
    nreq = yaxis;
  } else if (yaxis < 0) {
    sreq = abs(yaxis);
  }
  if (xaxis > 0) {
    ereq = xaxis;
  } else if (xaxis < 0) {
    wreq = abs(xaxis);
  }
  string s;
  cin >> s;
  for (long long int i = 0; i < t; i++) {
    if (nreq == 0 && sreq == 0 && wreq == 0 && ereq == 0) {
      cout << i << "\n";
      return 0;
    }
    if (s[i] == 'N' && nreq > 0) nreq--;
    if (s[i] == 'S' && sreq > 0) sreq--;
    if (s[i] == 'E' && ereq > 0) ereq--;
    if (s[i] == 'W' && wreq > 0) wreq--;
  }
  if (nreq == 0 && sreq == 0 && wreq == 0 && ereq == 0)
    cout << t << "\n";
  else
    cout << -1 << "\n";
}
