#include <bits/stdc++.h>
using namespace std;
const long long int MOD = 1e9 + 7;
char ch[5];
int main() {
  long long int n, k = 0;
  scanf("%lld", &n);
  int arr[n + 1];
  for (int i = 0; i < n; i++) scanf("%d", &arr[i]);
  getchar();
  ch['a'] = 1;
  ch['e'] = 1;
  ch['i'] = 1;
  ch['o'] = 1;
  ch['u'] = 1;
  ch['y'] = 1;
  for (int i = 0; i < n; i++) {
    int t = 0;
    char s[100000];
    gets(s);
    for (int j = 0; j < strlen(s); j++) {
      if (ch[s[j]] == 1) t++;
    }
    if (t == arr[i]) k++;
  }
  if (k != n)
    cout << "NO" << endl;
  else
    cout << "YES" << endl;
  return 0;
}
