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