#include <bits/stdc++.h>
int main() {
  int n, i, count, k = 0;
  scanf("%d", &n);
  int a[105];
  for (i = 0; i < n; i++) scanf("%d", &a[i]);
  char ch = getchar();
  for (i = 0; i < n; i++) {
    count = 0;
    while ((ch = getchar()) != '\n')
      if (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u' ||
          ch == 'y')
        count++;
    if (count == a[i]) k++;
  }
  if (k == n)
    printf("YES");
  else
    printf("NO");
  return 0;
}
