#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cout << name << " : " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cout.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
int main() {
  ios_base::sync_with_stdio;
  cin.tie(NULL);
  cout.tie(0);
  long long t, x1, x2, y1, y2, N = 0, E = 0, W = 0, S = 0, ans = 0;
  string s;
  cin >> t >> x1 >> y1 >> x2 >> y2 >> s;
  long long b = s.length();
  long long X = x2 - x1;
  long long Y = y2 - y1;
  if (X > 0) {
    E = X;
  } else if (X < 0) {
    W = X;
  }
  if (Y > 0) {
    N = Y;
  } else if (Y < 0) {
    S = Y;
  }
  for (long long i = 0; i < b; i++) {
    if (s[i] == 'N' && N != 0) {
      N--;
      Y--;
    }
    if (s[i] == 'E' && E != 0) {
      E--;
      X--;
    }
    if (s[i] == 'W' && W != 0) {
      W--;
      X++;
    }
    if (s[i] == 'S' && S != 0) {
      S--;
      Y++;
    }
    ans++;
    if (X == 0 && Y == 0) break;
  }
  if (X != 0 || Y != 0) {
    cout << "-1\n";
  } else
    cout << ans << "\n";
  return 0;
}
