#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
int main() {
  string s, s1;
  s1 = "aeiouy";
  int n, m, err = 0;
  vector<int> a;
  cin >> n;
  a.resize(n);
  for (int i = 0; i < n; ++i) cin >> a[i];
  getline(cin, s);
  for (int i = 0; i < n; ++i) {
    getline(cin, s);
    m = 0;
    for (int j = 0; j < s.size(); ++j)
      if (s1.find(s[j]) != string::npos) ++m;
    if (m != a[i]) ++err;
  }
  if (err == 0)
    cout << "YES";
  else
    cout << "NO";
}
