#include <bits/stdc++.h>
using namespace std;
int n;
int p[200];
string s[200];
bool vowel(char x) {
  return x == 'a' || x == 'e' || x == 'i' || x == 'o' || x == 'u' || x == 'y';
}
int main() {
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> p[i];
  }
  cin.ignore();
  for (int i = 0; i < n; ++i) {
    getline(cin, s[i]);
  }
  for (int i = 0; i < n; ++i) {
    int c = 0;
    for (int j = 0; j < s[i].length(); ++j) {
      if (vowel(s[i][j])) c++;
    }
    if (c != p[i]) return puts("NO"), 0;
  }
  puts("YES");
  return 0;
}
