#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vll = vector<ll>;
struct vec {
  ll x;
  ll y;
};
void solve() {
  ll t, sx, sy, ex, ey;
  cin >> t >> sx >> sy >> ex >> ey;
  string s;
  cin >> s;
  for (int i = 0, time = 0; i < s.size(); ++i, ++time) {
    vec d = {ex - sx, ey - sy};
    char quater;
    if (d.x > 0 && d.y > 0)
      quater = 1;
    else if (d.x < 0 && d.y > 0)
      quater = 2;
    else if (d.x < 0 && d.y < 0)
      quater = 3;
    else if (d.x > 0 && d.y < 0)
      quater = 4;
    else if (d.x > 0 && d.y == 0)
      quater = 5;
    else if (d.x == 0 && d.y > 0)
      quater = 6;
    else if (d.x < 0 && d.y == 0)
      quater = 7;
    else
      quater = 8;
    switch (s[i]) {
      case 'E':
        if (quater == 1 || quater == 4 || quater == 5)
          sx++;
        else
          continue;
        break;
      case 'N':
        if (quater == 1 || quater == 2 || quater == 6)
          sy++;
        else
          continue;
        break;
      case 'W':
        if (quater == 2 || quater == 3 || quater == 7)
          sx--;
        else
          continue;
        break;
      case 'S':
        if (quater == 3 || quater == 4 || quater == 8)
          sy--;
        else
          continue;
    }
    if (sx == ex && sy == ey) {
      cout << time + 1 << '\n';
      return;
    }
  }
  cout << -1 << '\n';
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int t = 1;
  while (t-- > 0) {
    solve();
  }
}
