#include <bits/stdc++.h>
using namespace std;
string s[200005];
int x[200005];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> x[i];
  for (int i = 0; i <= n; i++) {
    getline(cin, s[i]);
  }
  for (int i = 1; i <= n; i++) {
    string add = s[i];
    string str = "";
    for (int k = 0; k < add.length(); k++) {
      if (add[k] != ' ') str += add[k];
    }
    long long all = 0;
    for (int j = 0; j < str.length(); j++) {
      if (str[j] == 'o' || str[j] == 'i' || str[j] == 'a' || str[j] == 'e' ||
          str[j] == 'y' || str[j] == 'u') {
        all++;
      }
    }
    if (all != x[i]) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
  return 0;
}
