#include <bits/stdc++.h>
using namespace std;
int solve(string s, int n, int sx, int sy, int ex, int ey) {
  map<char, int> mp;
  int idx = INT_MIN;
  if ((ex - sx) > 0) {
    mp['E'] = ex - sx;
  } else if (sx - ex > 0) {
    mp['W'] = sx - ex;
  }
  if ((ey - sy) > 0) {
    mp['N'] = ey - sy;
  } else if (sy - ey > 0) {
    mp['S'] = sy - ey;
  }
  for (int i = 0; i < s.size(); i++) {
    if (mp.size() > 0 and mp.find(s[i]) != mp.end()) {
      mp[s[i]]--;
      if (mp[s[i]] < 1) {
        mp.erase(s[i]);
      }
    }
    if (mp.size() == 0) {
      return i + 1;
    }
  }
  return -1;
}
int main() {
  int t;
  int n;
  int sx, sy, ex, ey;
  cin >> t;
  string s;
  cin >> sx >> sy >> ex >> ey;
  cin >> s;
  cout << solve(s, t, sx, sy, ex, ey) << endl;
  return 0;
}
