#include <bits/stdc++.h>
using namespace std;
char vowel[] = "aeiouy";
int main() {
  int n;
  scanf("%d", &n);
  int ar[105];
  for (int i = 0; i < n; i++) scanf("%d", &ar[i]);
  int jizz = 1;
  getchar();
  for (int i = 0; i < n; i++) {
    char s[105];
    gets(s);
    int len = strlen(s);
    int cnt = 0;
    int v, c = 0;
    for (int j = 0; j < len; j++) {
      int found = 0;
      for (int k = 0; k < 6; k++)
        if (s[j] == vowel[k]) found = 1;
      if (found) cnt++;
    }
    if (cnt != ar[i]) jizz = 0;
  }
  printf("%s\n", jizz ? "YES" : "NO");
  return 0;
}
