#include <bits/stdc++.h>
using namespace std;
int i, n, j, k, D[105];
int main() {
  cin >> n;
  string t;
  i = 1;
  while (i <= n) {
    cin >> D[i];
    i++;
  }
  for (i = 0; i < n + 1; i++) {
    getline(cin, t);
    for (j = 0; j < t.size(); j++) {
      if (t[j] == 'a' || t[j] == 'e' || t[j] == 'i' || t[j] == 'o' ||
          t[j] == 'u' || t[j] == 'y') {
        k++;
      }
    }
    if (k != D[i]) {
      cout << "NO";
      return 0;
    }
    k = 0;
  }
  cout << "YES";
}
