#include <bits/stdc++.h>
using namespace std;
const int nmax = 102;
int t[nmax];
int main() {
  bool ans = true;
  int n;
  cin >> n;
  string x;
  for (int i = 0; i < n; i++) cin >> t[i];
  getline(cin, x, '\n');
  for (int i = 0; i < n; i++) {
    getline(cin, x, '\n');
    int v = 0;
    for (int j = 0; j < x.size(); j++)
      v = v + (x[j] == 'a' || x[j] == 'o' || x[j] == 'e' || x[j] == 'i' ||
               x[j] == 'u' || x[j] == 'y');
    if (v != t[i]) ans = 0;
  }
  if (ans)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
