#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x1, y1, x2, y2;
  cin >> n >> x1 >> y1 >> x2 >> y2;
  string s;
  cin >> s;
  int e = 0;
  int w = 0;
  int no = 0;
  int so = 0;
  int x = x2 - x1;
  int y = y2 - y1;
  int f = 0;
  for (int i = 0; i < n; i++) {
    if (x >= 0 && y >= 0) {
      if (s[i] == 'E') {
        e++;
      }
      if (s[i] == 'N') {
        no++;
      }
      if (e >= x && no >= y) {
        f = 1;
        cout << i + 1;
        break;
      }
    } else if (x >= 0 && y <= 0) {
      if (s[i] == 'E') {
        e++;
      }
      if (s[i] == 'S') {
        so++;
      }
      if (e >= x && so >= abs(y)) {
        f = 1;
        cout << i + 1;
        break;
      }
    } else if (x <= 0 && y >= 0) {
      if (s[i] == 'W') {
        w++;
      }
      if (s[i] == 'N') {
        no++;
      }
      if (w >= abs(x) && no >= y) {
        f = 1;
        cout << i + 1;
        break;
      }
    } else if (x <= 0 && y <= 0) {
      if (s[i] == 'W') {
        w++;
      }
      if (s[i] == 'S') {
        so++;
      }
      if (w >= abs(x) && so >= abs(y)) {
        f = 1;
        cout << i + 1;
        break;
      }
    }
  }
  if (f == 0) {
    cout << -1;
  }
}
