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