#include <bits/stdc++.h>
using namespace std;
const int maxn = 110;
string s;
int n;
int a[maxn];
int num[maxn];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  bool flag = true;
  getline(cin, s);
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    int k = 0;
    getline(cin, s);
    int sum = 0;
    int len = (int)s.size();
    for (int t = 0; t < len; t++) {
      if (s[t] == ' ') {
        if (cnt != 0) k++;
        sum += cnt;
        cnt = 0;
      }
      if (s[t] == 'a' || s[t] == 'e' || s[t] == 'i' || s[t] == 'o' ||
          s[t] == 'u' || s[t] == 'y')
        cnt++;
    }
    if (cnt != 0) {
      k++;
      sum += cnt;
      cnt = 0;
    }
    if (a[i] != sum)
      flag = false;
    else {
      if (a[i] < k) flag = false;
    }
  }
  if (flag)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
