#include <bits/stdc++.h>
using namespace std;
char vow[] = {'a', 'e', 'i', 'o', 'u', 'y'};
int main() {
  cin.sync_with_stdio(0);
  int n;
  int pattern[101];
  cin >> n;
  for (int i = 0; i < n; i++) cin >> pattern[i];
  string str;
  bool ok = true;
  for (int i = 0; getline(cin, str); i++) {
    if (i == 0) continue;
    int cnt = 0;
    for (int j = 0; j < str.size(); j++) {
      for (int k = 0; k < 6; k++) {
        if (str[j] == vow[k]) {
          cnt++;
        }
      }
    }
    if (cnt != pattern[i - 1]) ok = false;
  }
  if (ok)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
