#include <bits/stdc++.h>
using namespace std;
int n;
string ss[110];
int p[110];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &p[i]);
  getchar();
  for (int i = 1; i <= n; i++) getline(cin, ss[i]);
  bool flag = 1;
  for (int i = 1; i <= n; i++) {
    int len = ss[i].length();
    int cnt = 0;
    for (int j = 0; j <= len; j++) {
      if (ss[i][j] == 'a' || ss[i][j] == 'e' || ss[i][j] == 'i' ||
          ss[i][j] == 'o' || ss[i][j] == 'u' || ss[i][j] == 'y')
        cnt++;
    }
    if (cnt != p[i]) {
      flag = 0;
      break;
    }
  }
  if (flag)
    puts("YES");
  else
    puts("NO");
}
