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