#include <bits/stdc++.h>
using namespace std;
int MOD = 1000000007;
signed main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  long long n, x, y, a, b;
  cin >> n >> x >> y >> a >> b;
  for (int i = 0; i < n; i++) {
    char ch;
    cin >> ch;
    if (ch == 'S') {
      if (y > b) y--;
    }
    if (ch == 'N') {
      if (y < b) y++;
    }
    if (ch == 'E')
      if (x < a) x++;
    if (ch == 'W')
      if (x > a) x--;
    if (x == a and y == b) {
      cout << i + 1;
      return 0;
    }
  }
  cout << -1;
  return 0;
}
