#include <bits/stdc++.h>
const int mx = 110;
int a[mx];
bool ok(char ch) {
  if (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u' ||
      ch == 'y')
    return true;
  return false;
}
int main() {
  int n;
  bool flag = 1;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  getchar();
  for (int i = 0; i < n; i++) {
    int num = 0;
    char c;
    while ((c = getchar()) != '\n')
      if (ok(c)) num++;
    if (num != a[i]) flag = 0;
  }
  printf(flag ? "YES\n" : "NO\n");
  return 0;
}
