#include <bits/stdc++.h>
using namespace std;
int n;
int main() {
  cin >> n;
  vector<int> p(n);
  vector<string> s(n);
  for (int i = 0; i < n; i++) {
    cin >> p[i];
  }
  getline(cin, s[0]);
  for (int i = 0; i < n; i++) {
    getline(cin, s[i]);
  }
  string chars = "aeiouy";
  vector<int> cnt(n, 0);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < 6; j++) {
      cnt[i] += count(s[i].begin(), s[i].end(), chars[j]);
    }
  }
  for (int i = 0; i < n; i++)
    if (cnt[i] != p[i]) {
      cout << "NO";
      exit(0);
    }
  cout << "YES";
}
