#include <bits/stdc++.h>
using namespace std;
int a, s, d[100002], f, g, h, j, k, l, i, n, m;
string x;
int main() {
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> d[i];
  }
  for (i = 0; i < n; i++) {
    scanf("\n");
    getline(cin, x);
    for (a = 0; a < x.size(); a++) {
      if (x[a] == 'a') d[i]--;
      if (x[a] == 'e') d[i]--;
      if (x[a] == 'i') d[i]--;
      if (x[a] == 'o') d[i]--;
      if (x[a] == 'u') d[i]--;
      if (x[a] == 'y') d[i]--;
    }
    if (d[i] != 0) {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES";
}
