#include <bits/stdc++.h>
int n;
int p[111], v[555];
char s[1111];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &p[i]);
  v['a'] = v['e'] = v['i'] = v['o'] = v['u'] = v['y'] = true;
  gets(s);
  bool chk = true;
  for (int i = 0; i < n; i++) {
    gets(s);
    int tot = 0;
    for (int j = 0; s[j]; j++)
      if (v[s[j]]) tot++;
    if (tot != p[i]) chk = false;
  }
  printf("%s\n", chk ? "YES" : "NO");
  return 0;
}
