#include <bits/stdc++.h>
double EPS = 1e-9;
using namespace std;
template <typename T, typename U>
inline void amin(T &x, U y) {
  if (y < x) x = y;
}
template <typename T, typename U>
inline void amax(T &x, U y) {
  if (x < y) x = y;
}
int n;
vector<long long> a;
int main() {
  cin >> n;
  vector<int> p;
  int x;
  for (int i = 0; i < n; i++) {
    cin >> x;
    p.push_back(x);
  }
  vector<string> hoge;
  string fuga;
  bool flag = true;
  getline(cin, fuga);
  for (int i = 0; i < n; i++) {
    getline(cin, fuga);
    int cnt = 0;
    for (int j = 0; j < fuga.size(); j++) {
      if (fuga[j] == 'a' || fuga[j] == 'e' || fuga[j] == 'i' ||
          fuga[j] == 'u' || fuga[j] == 'o' || fuga[j] == 'y')
        cnt++;
    }
    if (cnt != p[i]) flag = false;
    hoge.push_back(fuga);
  }
  if (flag)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
