#include <bits/stdc++.h>
using namespace std;
const int maxn = (int)1e6 + 6;
const int inf = (int)1e9 * 2;
const int mod = (int)1e9 + 7;
bool check(char c) {
  if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u' || c == 'y')
    return 1;
  return 0;
}
int n, a[111];
char s[111];
int main() {
  scanf("%d", &n);
  bool ok = 1;
  for (int i = 0; i < n; i++) {
    scanf("%d", a + i);
  }
  for (int i = 0; i < n && ok; i++) {
    int cnt = 0;
    scanf(" %[^\n]", s);
    for (char *c = s; *c; c++) {
      cnt += check(*c);
    }
    ok &= (cnt == a[i]);
  }
  if (ok)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
