#include <bits/stdc++.h>
using namespace std;
char good[6] = {'a', 'e', 'i', 'o', 'u', 'y'};
int main() {
  int n;
  ios::sync_with_stdio(false);
  cin >> n;
  vector<int> a;
  for (int i = 0; i < n; ++i) {
    int tmp;
    cin >> tmp;
    a.push_back(tmp);
  }
  cin.ignore();
  for (int i = 0; i < n; ++i) {
    string wow;
    getline(cin, wow);
    int cnt = 0;
    for (int q = 0; q < wow.length(); ++q) {
      for (int j = 0; j < 6; ++j) {
        if (wow[q] == good[j]) cnt++;
      }
    }
    if (cnt != a[i]) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
  return 0;
}
