#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, i, j, k, st, ed = 0, cnt = 0;
  scanf("%d", &n);
  string s1;
  int a[n];
  for (i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  getchar();
  for (i = 0; i < n; i++) {
    getline(cin, s1);
    ed = 0;
    k = s1.size();
    for (j = 0; j < k; j++) {
      if (s1[j] == 'a' || s1[j] == 'e' || s1[j] == 'i' || s1[j] == 'o' ||
          s1[j] == 'u' || s1[j] == 'y')
        ed++;
    }
    if (ed == a[i]) cnt++;
  }
  if (cnt == n)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
