#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const int INF = 0x3c3c3c3c;
const long long INFL = 0x3c3c3c3c3c3c3c3c;
const int MAX_N = 102;
int n;
char strs[MAX_N][110];
int p[MAX_N];
unordered_set<char> us;
int main() {
  string tmp = "aeiouy";
  for (int i = 0; i < tmp.size(); ++i) {
    us.insert(tmp[i]);
  }
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%d", &p[i]);
  getchar();
  for (int i = 0; i < n; ++i) {
    gets(strs[i]);
    int len = strlen(strs[i]);
    int cnt = 0;
    for (int j = 0; j < len; ++j) {
      if (us.count(strs[i][j])) cnt++;
    }
    if (cnt != p[i]) {
      printf("NO");
      return 0;
    }
  }
  printf("YES");
  return 0;
}
