#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  int a[105] = {0};
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  int b[105] = {0};
  getchar();
  for (int i = 0; i < n; i++) {
    char s[1000];
    gets(s);
    int len = strlen(s);
    for (int j = 0; j < len; j++) {
      if (s[j] == 'a' || s[j] == 'e' || s[j] == 'i' || s[j] == 'o' ||
          s[j] == 'u' || s[j] == 'y') {
        b[i]++;
      }
    }
  }
  int flag = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] == b[i]) {
      continue;
    } else {
      flag = 1;
      break;
    }
  }
  if (flag) {
    printf("NO\n");
  } else {
    printf("YES\n");
  }
}
