#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf(" %d", &n);
  int check[n];
  char c;
  for (int(i) = 0; (i) < (int)(n); (i)++) {
    scanf(" %d", check + i);
  }
  getchar();
  for (int(i) = 0; (i) < (int)(n); (i)++) {
    int cont = 0;
    while ((c = getchar())) {
      if (c == '\n') break;
      if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u' || c == 'y')
        cont++;
    }
    if (cont != check[i]) {
      printf("NO\n");
      return 0;
    }
  }
  printf("YES\n");
  return 0;
}
