#include <bits/stdc++.h>
using namespace std;
int n, cnt, ind = 1;
int a[101];
string s;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 0; i <= n; i++) {
    getline(cin, s);
    for (int j = 0; j < s.size(); j++)
      if (s[j] == 'a' || s[j] == 'e' || s[j] == 'i' || s[j] == 'o' ||
          s[j] == 'u' || s[j] == 'y')
        cnt++;
    if (cnt != a[i]) {
      ind = 0;
    }
    cnt = 0;
  }
  if (ind)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
