#include <bits/stdc++.h>
int n, p[110], i, j, cnt;
char s[110];
int main() {
  scanf("%d", &n);
  for (i = 0; i < n; i++) scanf("%d", &p[i]);
  gets(s);
  for (i = 0; i < n; i++) {
    gets(s);
    cnt = 0;
    for (j = 0; s[j]; j++)
      if (s[j] == 'a' || s[j] == 'e' || s[j] == 'i' || s[j] == 'o' ||
          s[j] == 'u' || s[j] == 'y')
        cnt++;
    if (cnt != p[i]) goto fuck;
  }
  puts("YES");
  return 0;
fuck:
  puts("NO");
}
