#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, h, m, i, j, k;
  vector<int> ans;
  string s, t;
  char a;
  cin >> n;
  int arr[n];
  for (i = 0; i < n; i++) {
    cin >> arr[i];
  }
  getline(cin, s);
  for (i = 0; i < n; i++) {
    getline(cin, s);
    k = 0;
    for (j = 0; j < s.length(); j++) {
      if (s[j] == 'a' || s[j] == 'e' || s[j] == 'i' || s[j] == 'o' ||
          s[j] == 'u' || s[j] == 'y') {
        k++;
      }
    }
    if (k == arr[i]) {
      continue;
    } else {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES";
  return 0;
}
