#include <bits/stdc++.h>
using namespace std;
int N, P[105];
string T[105];
int solve() {
  for (int i = 1; i <= N; i++) {
    int n = 0, idx = 0;
    while (idx < T[i].length()) {
      char c = T[i][idx];
      if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u' ||
          c == 'y') {
        n++;
      }
      idx++;
    }
    if (n != P[i]) return 0;
  }
  return 1;
}
int main() {
  cin >> N;
  for (int i = 1; i <= N; i++) cin >> P[i];
  getline(cin, T[0]);
  for (int i = 1; i <= N; i++) getline(cin, T[i]);
  int ans = solve();
  cout << (ans ? "YES" : "NO") << endl;
  return 0;
}
