#include <bits/stdc++.h>
using namespace std;
int main() {
  char me[1005];
  int i, j, m, k, n, v, p, S = 0, me1[1005];
  p = 1;
  scanf("%d", &k);
  for (i = 0; i < k; i++) {
    scanf("%d", &me1[i]);
  }
  getchar();
  for (v = 0; v < k; v++) {
    m = 0;
    gets(me);
    for (i = 0; i < strlen(me); i++) {
      if (me[i] == 'a' || me[i] == 'e' || me[i] == 'i' || me[i] == 'o' ||
          me[i] == 'u' || me[i] == 'y') {
        m++;
      }
    }
    if (m != me1[v]) {
      p = 0;
    }
  }
  if (p)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
