#include <bits/stdc++.h>
using namespace std;
const int N = 110;
bool color[1000];
char s[N];
int cnt[N];
int n;
int main() {
  color['a'] = color['e'] = color['i'] = color['o'] = color['u'] = color['y'] =
      1;
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", &cnt[i]);
  getchar();
  bool ans = 0;
  for (int i = 1; i <= n; ++i) {
    gets(s);
    int len = strlen(s);
    for (int j = 0; j < len; ++j)
      if (color[s[j]]) --cnt[i];
    if (cnt[i]) {
      ans = 1;
      break;
    }
  }
  if (ans)
    puts("NO");
  else
    puts("YES");
  return 0;
}
