#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  int Arr[N];
  for (int i = 0; i < N; i++) {
    cin >> Arr[i];
  }
  string Arr1[N + 1];
  int i = 0;
  string na;
  while (getline(cin, na)) {
    Arr1[i] = na;
    i++;
    ;
    if (i == N + 1) break;
  }
  bool s = true;
  for (int j = 1; j < N + 1; j++) {
    int f = 0;
    for (int s = 0; s < Arr1[j].length(); s++) {
      if (Arr1[j][s] == 'i' || Arr1[j][s] == 'e' || Arr1[j][s] == 'o' ||
          Arr1[j][s] == 'a' || Arr1[j][s] == 'e' || Arr1[j][s] == 'y' ||
          Arr1[j][s] == 'u')
        f++;
    }
    if (f != Arr[j - 1]) s = false;
  }
  if (s)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
