#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, s[2], e[2];
  cin >> t >> s[0] >> s[1] >> e[0] >> e[1];
  vector<char> v;
  char letras[] = {'E', 'S', 'W', 'N'};
  map<char, int> mapa;
  mapa['E'] = 1;
  mapa['S'] = -1;
  mapa['W'] = -1;
  mapa['N'] = 1;
  char c;
  for (int i = 0; i < t; i++) {
    cin >> c;
    double actual = sqrt(pow(e[0] - s[0], 2) + pow(e[1] - s[1], 2));
    for (int j = 0; j < 4; j++) {
      if (c == letras[j]) {
        if (j % 2 == 0) {
          double dis =
              sqrt(pow(e[0] - (s[0] + mapa[c]), 2) + pow(e[1] - s[1], 2));
          if (dis < actual) {
            s[0] += mapa[c];
          }
        } else {
          double dis =
              sqrt(pow(e[0] - (s[0]), 2) + pow(e[1] - (s[1] + mapa[c]), 2));
          if (dis < actual) {
            s[1] += mapa[c];
          }
        }
      }
    }
    if (e[0] == s[0] && e[1] == s[1]) {
      cout << i + 1;
      return 0;
    }
  }
  cout << -1;
}
