#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t, sx, sy, ex, ey;
  string str;
  cin >> t >> sx >> sy >> ex >> ey;
  cin >> str;
  if (ex == sx && ey == sy) {
    cout << 0 << endl;
    return 0;
  }
  char oriSide;
  char oriTop;
  long long diffX = ex - sx;
  long long diffY = ey - sy;
  if (diffY < 0) {
    oriTop = 'S';
  } else if (diffY > 0) {
    oriTop = 'N';
  } else {
    oriTop = 'A';
  }
  if (diffX < 0) {
    oriSide = 'W';
  } else if (diffX > 0) {
    oriSide = 'E';
  } else {
    oriSide = 'A';
  }
  long long i = 1;
  for (; i <= t; i++) {
    if (str[i - 1] == oriSide && sx != ex) {
      if (oriSide == 'W') {
        sx--;
      } else if (oriSide == 'E') {
        sx++;
      }
    }
    if (str[i - 1] == oriTop && sy != ey) {
      if (oriTop == 'N') {
        sy++;
      } else if (oriTop == 'S') {
        sy--;
      }
    }
    if (sx == ex && sy == ey) {
      break;
    }
  }
  if (sx == ex && sy == ey) {
    cout << i << endl;
  } else {
    cout << -1 << endl;
  }
  return 0;
}
