#include <bits/stdc++.h>
using namespace std;
const int N = 110;
long long n, p[N], tp;
bool vld;
char c;
string s;
string::iterator it;
void solve() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> p[i];
  getline(cin, s);
  vld = 1;
  for (int i = 1; i <= n; i++) {
    getline(cin, s);
    tp = 0;
    for (it = s.begin(); it != s.end(); it++) {
      c = *it;
      if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u' ||
          c == 'y') {
        tp++;
      }
    }
    if (tp != p[i]) vld = 0;
  }
  if (vld)
    cout << "YES\n";
  else
    cout << "NO\n";
}
int main() {
  std::ios::sync_with_stdio(0);
  cin.tie(0);
  solve();
  return 0;
}
