#include <bits/stdc++.h>
using namespace std;
double PI = 3.1415926535897932384626433832795;
int arr[101];
map<char, int> v;
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    cin >> arr[i];
  }
  v['a'] = v['i'] = v['u'] = v['o'] = v['y'] = v['e'] = 1;
  cin.ignore();
  for (int i = 0; i < n; ++i) {
    string s;
    getline(cin, s);
    int c = 0;
    for (int j = 0; j < s.size(); ++j) {
      if (v[s[j]]) c++;
    }
    if (c != arr[i]) return puts("NO"), 0;
  }
  puts("YES");
  return 0;
}
