#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, sx, sy, dx, dy;
  cin >> n >> sx >> sy >> dx >> dy;
  string s;
  cin >> s;
  long long x = dx - sx;
  long long y = dy - sy;
  char s1 = '-', s2 = '-';
  if (x < 0)
    s1 = 'W';
  else if (x > 0)
    s1 = 'E';
  if (y > 0)
    s2 = 'N';
  else if (y < 0)
    s2 = 'S';
  long long countx = 0, county = 0;
  long long ans = -1;
  for (long long i = 0; i < s.length(); i++) {
    if (s[i] == s1)
      countx++;
    else if (s[i] == s2)
      county++;
    if (countx >= abs(x) && county >= abs(y)) {
      ans = i + 1;
      break;
    }
  }
  cout << ans << "\n";
}
