#include <bits/stdc++.h>
using namespace std;
int n, num;
char c;
bool flag = true;
int p[110];
string s;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> p[i];
  cin.ignore();
  for (int i = 1; i <= n; i++) {
    getline(cin, s, '\n');
    int temp = 0;
    int x = 0;
    s = s + ' ';
    num = 0;
    for (int j = 0; j < s.length(); j++) {
      if (s[j] == 'a' || s[j] == 'e' || s[j] == 'i' || s[j] == 'o' ||
          s[j] == 'u' || s[j] == 'y') {
        x = 1;
        temp++;
      }
      if (s[j] == ' ') {
        num += x;
        x = 0;
      }
    }
    if (temp != p[i]) {
      flag = false;
    }
  }
  if (flag)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
