#include <bits/stdc++.h>
using namespace std;
void solve();
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  solve();
  return 0;
}
void solve() {
  long long n;
  cin >> n;
  vector<long long> v;
  for (long long i = 0; i < n; i++) {
    long long x;
    cin >> x;
    v.push_back(x);
  }
  string s;
  long long i = 0;
  while (getline(cin, s)) {
    if (s.size() == 0) continue;
    long long cnt = 0;
    for (auto c : s) {
      if (c == 'i' || c == 'a' || c == 'e' || c == 'o' || c == 'u' ||
          c == 'y') {
        cnt++;
      }
    }
    if (cnt != v[i]) {
      cout << "NO";
      return;
    }
    i++;
  }
  cout << "YES";
}
