#include <bits/stdc++.h>
using namespace std;
int a[200];
int main() {
  const string v = "aeiouy";
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  cin.get();
  bool anst = true;
  for (int i = 0; i < n; i++) {
    int ans = 0;
    string tmp;
    getline(cin, tmp, '\n');
    for (auto x : tmp)
      if (v.find(x) != string::npos) ans++;
    if (ans != a[i]) anst = false;
  }
  cout << (anst ? "YES" : "NO") << endl;
}
