#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int prop[n];
  for (int i = 0; i < n; ++i) {
    cin >> prop[i];
  }
  string inp[n];
  bool ans = true;
  cin.ignore(256, '\n');
  for (int i = 0; i < n; ++i) {
    getline(cin, inp[i]);
    int lim = inp[i].length();
    int check = 0;
    int j = 0;
    while (j < lim && ans) {
      if (inp[i][j] == 'a' || inp[i][j] == 'e' || inp[i][j] == 'y' ||
          inp[i][j] == 'i' || inp[i][j] == 'o' || inp[i][j] == 'u')
        ++check;
      ++j;
    }
    if (ans && check != prop[i]) ans = false;
  }
  if (ans)
    cout << "YES\n";
  else
    cout << "NO\n";
  return 0;
}
