#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, arr[101] = {0}, i, j, k, counter = 0;
  string str;
  cin >> n;
  for (i = 0; i < n; i++) cin >> arr[i];
  cin.ignore();
  for (i = 0; i < n; i++) {
    getline(cin, str);
    for (j = 0; j < str.size(); j++)
      if ((str[j] == 'a') || (str[j] == 'e') || (str[j] == 'i') ||
          (str[j] == 'o') || (str[j] == 'u') || (str[j] == 'y'))
        counter++;
    if (counter != arr[i]) {
      cout << "NO";
      return 0;
    }
    counter = 0;
  }
  cout << "YES";
  return 0;
}
