#include <bits/stdc++.h>
using namespace std;
const long long maxN = 2e5 + 7, N = 250 + 2, MOD = 1e17 + 13, Mod = 1e9 + 6;
long long t, sx, sy, ex, ey, hx, hy, ans, x, y;
string str;
int main() {
  cin.tie(0);
  cout.tie(0);
  ios::sync_with_stdio(false);
  cin >> t >> sx >> sy >> ex >> ey >> str;
  hx = ex - sx;
  hy = ey - sy;
  for (int i = 0; i < t; i++) {
    if (str[i] == 'N' && hy > 0) hy--, y = i + 1;
    if (str[i] == 'S' && hy < 0) hy++, y = i + 1;
    if (str[i] == 'E' && hx > 0) hx--, x = i + 1;
    if (str[i] == 'W' && hx < 0) hx++, x = i + 1;
  }
  if (!hx && !hy) return cout << max(x, y) << "\n", 0;
  return cout << "-1\n", 0;
}
