#include <bits/stdc++.h>
using namespace std;
int n;
int p[111];
char waste[111];
const char vowel[8] = "aeiouy";
bool check() {
  for (int i = 0; i < n; i++) {
    int ce = 0;
    for (int q = 0; q <= 108; q++) waste[q] = '\0';
    while (true) {
      scanf("%c", &waste[ce]);
      if (waste[ce] == '\n') {
        waste[ce] = '\0';
        break;
      }
      ce++;
    }
    int m = strlen(waste);
    int cnt = 0;
    for (int j = 0; j < m; j++) {
      for (int k = 0; k < 6; k++)
        if (waste[j] == vowel[k]) cnt++;
    }
    if (cnt != p[i]) return false;
  }
  return true;
}
void printMe(bool ver) {
  if (ver)
    printf("YES\n");
  else
    printf("NO\n");
}
int main() {
  scanf("%d ", &n);
  for (int i = 0; i < n; i++) scanf("%d ", &p[i]);
  printMe(check());
  return 0;
}
