#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000000 + 7;
int addm(int& a, int b) { return (a += b) < mod ? a : a -= mod; }
template <class T, class U>
bool smin(T& a, U b) {
  return a > b ? (a = b, 1) : 0;
}
template <class T, class U>
bool smax(T& a, U b) {
  return a < b ? (a = b, 1) : 0;
}
int n;
int p[100];
char vow[]{'a', 'e', 'i', 'o', 'u', 'y'};
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> p[i];
  string s;
  getline(cin, s);
  for (int i = 0; i < n; i++) {
    int ct = 0;
    getline(cin, s);
    for (char cc : s)
      if (find(vow, vow + 6, cc) != vow + 6) ct++;
    if (ct != p[i]) {
      cout << "NO\n";
      return 0;
    }
  }
  cout << "YES\n";
}
