#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
const int M = 1e6 + 5, INF = 0x3f3f3f3f, mod = 1000007;
int A[M];
char ch[] = {'a', 'e', 'i', 'o', 'u', 'y'};
int main() {
  int n;
  scanf("%d", &n);
  for (int j = 1; j <= n; j++) scanf("%d", &A[j]);
  int flag = 1;
  for (int j = 1; j <= n; j++) {
    char s[105];
    while (gets(s)) {
      if (strlen(s) != 0) break;
    }
    int m = strlen(s);
    int cnt = 0;
    for (int k = 0; k < m; k++) {
      int ok = 0;
      for (int i = 0; i < 6; i++) {
        if (s[k] == ch[i]) ok = 1;
      }
      cnt += ok;
    }
    if (cnt != A[j]) flag = 0;
  }
  if (flag)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
