#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[101], flag = 0;
  bool ck[200] = {false};
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  string p = "aeiuoy";
  for (int i = 0; i < 6; i++) {
    ck[p[i]] = true;
  }
  cin.ignore();
  for (int i = 0; i < n; i++) {
    int pat = 0;
    string s;
    getline(cin, s);
    for (int j = 0; j < s.length(); j++) {
      if (ck[s[j]] == true) pat++;
    }
    if ((pat != a[i])) {
      cout << "NO\n" << endl;
      ;
      flag = 1;
      break;
    }
  }
  if (flag == 0) cout << "YES\n";
}
