#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  string s;
  int i = 0;
  char ar;
  cin >> ar;
  while (getline(cin, s)) {
    if (i == 0) s = ar + s;
    int kol = 0;
    for (int j = 0; j < s.size(); ++j) {
      if (s[j] == 'a' || s[j] == 'e' || s[j] == 'y' || s[j] == 'u' ||
          s[j] == 'i' || s[j] == 'o')
        kol++;
    }
    if (kol != a[i]) {
      cout << "NO" << endl;
      return 0;
    }
    i++;
  }
  cout << "YES" << endl;
  return 0;
}
