#include <bits/stdc++.h>
using namespace std;
double tick() {
  static clock_t oldt;
  clock_t newt = clock();
  double diff = 1.0 * (newt - oldt) / CLOCKS_PER_SEC;
  oldt = newt;
  return diff;
}
template <typename T>
T gcd(T a, T b) {
  return (b ? __gcd(a, b) : a);
}
template <typename T>
T lcm(T a, T b) {
  return (a * (b / gcd(a, b)));
}
const int MAX = 1e5 + 5;
const int LIM = 3e5 + 5;
const int MOD = 1e9 + 7;
const long double EPS = 1e-10;
const long long LLINF = 1000111000111000111LL;
const double PI = acos(-1.0);
template <class T>
inline T square(T value) {
  return value * value;
}
int main() {
  long long t, s1, s2, e1, e2;
  cin >> t >> s1 >> s2 >> e1 >> e2;
  string s;
  cin >> s;
  long long diff1 = e1 - s1, diff2 = e2 - s2;
  char a1 = ')', a2 = ')';
  long long ca1 = abs(diff1), ca2 = abs(diff2);
  if (diff1 < 0) {
    a1 = 'W';
  } else if (diff1 > 0) {
    a1 = 'E';
  }
  if (diff2 < 0) {
    a2 = 'S';
  } else if (diff2 > 0) {
    a2 = 'N';
  }
  long long countca1 = 0, countca2 = 0, pos = 0, i;
  for (i = 0; i < s.length(); i++) {
    if (countca1 == ca1 && countca2 == ca2) {
      pos = 1;
      break;
    }
    if (a1 == 'W' && s[i] == 'W' && countca1 < ca1) {
      countca1++;
    }
    if (a1 == 'E' && s[i] == 'E' && countca1 < ca1) {
      countca1++;
    }
    if (a2 == 'N' && s[i] == 'N' && countca2 < ca2) {
      countca2++;
    }
    if (a2 == 'S' && s[i] == 'S' && countca2 < ca2) {
      countca2++;
    }
  }
  if (pos == 1 || countca1 == ca1 && countca2 == ca2)
    cout << i << endl;
  else
    cout << -1 << endl;
  return 0;
}
