#include <bits/stdc++.h>
using namespace std;
char s[200][200];
int n, ar[200];
int VowelCompare(int l) {
  int c = 0;
  int k = strlen(s[l]);
  for (int i = 0; i < k; i++) {
    if (s[l][i] == 'a' || s[l][i] == 'e' || s[l][i] == 'i' || s[l][i] == 'o' ||
        s[l][i] == 'u' || s[l][i] == 'y')
      c++;
  }
  if (ar[l] == c) return 1;
  return 0;
}
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    scanf("%d", &ar[i]);
  }
  int ans = 1;
  for (int i = 0; i < n; i++) {
    getchar();
    scanf("%[^\n]s", s[i]);
    if (ans) ans = VowelCompare(i);
  }
  if (ans)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
