#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 2 * 1e5 + 10;
ll res;
ll a[N];
void solve() {
  ll t, x, y, ex, ey, neast = 0, nnorth = 0, nsouth = 0, nwest = 0;
  map<char, int> mp;
  cin >> t >> x >> y >> ex >> ey;
  ll k = ex - x;
  ll l = ey - y;
  string s;
  cin >> s;
  if (k > 0) {
    neast = k;
  } else {
    nwest = abs(k);
  }
  if (l > 0) {
    nnorth = l;
  } else {
    nsouth = abs(l);
  }
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == 'N' and nnorth > 0) {
      nnorth--;
    }
    if (s[i] == 'E' and neast > 0) {
      neast--;
    }
    if (s[i] == 'S' and nsouth > 0) {
      nsouth--;
    }
    if (s[i] == 'W' and nwest > 0) {
      nwest--;
    }
    if (nnorth == 0 and nsouth == 0 and neast == 0 and nwest == 0) {
      cout << i + 1;
      return;
    }
  }
  cout << -1;
}
int main(int argc, char const *argv[]) {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  ll t = 1;
  while (t--) {
    solve();
  }
}
