#include <bits/stdc++.h>
using namespace std;
int t, sa, sb, ea, eb, N, W, E, S, x, y, H;
string A;
int main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(0);
  cin >> t >> sa >> sb >> ea >> eb >> A;
  x = sa - ea;
  y = sb - eb;
  swap(x, y);
  if (x > 0)
    S = x;
  else
    N = x * -1;
  if (y > 0)
    W = y;
  else
    E = y * -1;
  for (int i = 0; i < t; i++) {
    if (A[i] == 'N' && N > 0) N--;
    if (A[i] == 'W' && W > 0) W--;
    if (A[i] == 'E' && E > 0) E--;
    if (A[i] == 'S' && S > 0) S--;
    if (N == 0 && S == 0 && W == 0 && E == 0) {
      cout << i + 1;
      return 0;
    }
  }
  cout << "-1";
  return 0;
}
