#include <bits/stdc++.h>
using namespace std;
int n, p[200];
char s[200];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", &p[i]);
  scanf("\n");
  for (int i = 1; i <= n; ++i) {
    s[0] = 0, gets(s);
    int cnt = 0, l = strlen(s);
    for (int j = 0; j < l; ++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]) {
      printf("NO");
      return 0;
    }
  }
  printf("YES");
}
