#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j = 0, n, x, y, a, b, e, d;
  char c;
  cin >> n >> a >> b >> e >> d;
  x = e - a;
  y = d - b;
  for (i = 1; i <= n && (x != 0 || y != 0); i++) {
    cin >> c;
    if (y < 0 && c == 'S') y++;
    if (y > 0 && c == 'N') y--;
    if (x < 0 && c == 'W') x++;
    if (x > 0 && c == 'E') x--;
  }
  if (x == 0 && y == 0)
    cout << --i;
  else
    cout << -1;
  return 0;
}
