#include <bits/stdc++.h>
int main() {
  int n, a[100], temp = 1;
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%d", &a[i]);
  getchar();
  for (int i = 0; i < n; ++i) {
    int cnt = 0, j = 0;
    char s[101];
    gets(s);
    while (s[j]) {
      if (s[j] == 'a' || s[j] == 'e' || s[j] == 'i' || s[j] == 'o' ||
          s[j] == 'u' || s[j] == 'y')
        ++cnt;
      ++j;
    }
    if (cnt != a[i] && temp) temp = !temp;
  }
  if (temp)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
