#include <bits/stdc++.h>
using namespace std;
const int maxn = (int)3e5 + 10;
const int inf = (int)1e9 + 5;
const long long llinf = (long long)1e18 + 5;
long long a[maxn];
long long d, i, n, k, l, query, first, second, pruf, pruf2, j, m, p, last, sum,
    h, z, r;
int main() {
  cin >> n;
  for (i = 1; i < n + 1; i++) cin >> a[i];
  string x;
  for (i = 0; i < n + 1; i++) {
    getline(cin, x);
    k = 0;
    if (i != 0) {
      for (int re = 0; re < x.size(); re++) {
        if ((x[re] == 'a') or (x[re] == 'e') or (x[re] == 'i') or
            (x[re] == 'o') or (x[re] == 'u') or (x[re] == 'y'))
          k++;
      }
      if (k != a[i]) {
        cout << "NO";
        return 0;
      }
    }
  }
  cout << "YES";
  return 0;
}
