#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t, sx, sy, ex, ey;
  cin >> t >> sx >> sy >> ex >> ey;
  string z;
  cin >> z;
  map<char, long long> mp;
  map<char, long long> mp2;
  if (ex - sx < 0)
    mp2['W'] = abs(ex - sx);
  else {
    mp2['E'] = ex - sx;
  }
  if (ey - sy < 0)
    mp2['S'] = abs(ey - sy);
  else {
    mp2['N'] = ey - sy;
  }
  for (int i = 0; i < z.size(); i++) {
    mp[z[i]]++;
  }
  if ((mp['W'] < mp2['W'] && mp2['W'] != 0) ||
      (mp['S'] < mp2['S'] && mp2['S'] != 0) ||
      (mp['N'] < mp2['N'] && mp2['N'] != 0) ||
      (mp['E'] < mp2['E'] && mp2['E'] != 0)) {
    cout << -1;
    return 0;
  }
  mp.clear();
  int t1 = 0;
  for (int i = 0; i < z.size(); i++) {
    mp[z[i]]++;
    if (mp[z[i]] == mp2[z[i]]) t1 = i + 1;
  }
  cout << t1;
}
