#include <bits/stdc++.h>
using namespace std;
int N, A[100], i, j;
bool w;
string S;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> N;
  for (i = 0; i < N; i++) {
    cin >> A[i];
  }
  getline(cin, S);
  for (j = 0; j < N; j++) {
    getline(cin, S);
    if (!w) {
      for (i = S.length() - 1; i >= 0; i--) {
        if (S[i] == 'a' || S[i] == 'i' || S[i] == 'u' || S[i] == 'e' ||
            S[i] == 'o' || S[i] == 'y') {
          A[j]--;
        }
      }
      if (A[j] != 0) {
        w = 1;
      }
    }
  }
  if (w) {
    cout << "NO" << endl;
  } else
    cout << "YES" << endl;
}
