#include <bits/stdc++.h>
using namespace std;
const int N = 102;
int n, ar[N];
bool ok(char a) {
  return a == 'a' || a == 'e' || a == 'i' || a == 'o' || a == 'u' || a == 'y';
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &ar[i]);
  }
  for (int i = 1; i <= n; i++) {
    int cnt = 0;
    string s;
    char c = '1';
    while (c != '\n') {
      cin >> s;
      scanf("%c", &c);
      for (int j = 0; j < s.size(); j++) {
        if (ok(s[j])) cnt++;
      }
    }
    if (cnt != ar[i]) {
      puts("NO");
      return 0;
    }
  }
  puts("YES");
}
