#include <bits/stdc++.h>
using namespace std;
int p[105];
bool isvowel(char c) {
  if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u' || c == 'y')
    return true;
  return false;
}
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; ++i) scanf("%d", &p[i]);
  bool flag = true;
  getchar();
  for (int i = 0; i < n; ++i) {
    int sum = 0;
    char ch;
    while ((ch = getchar()) && ch != EOF && ch != '\n') {
      if (isvowel(ch)) ++sum;
    }
    if (sum != p[i]) flag = false;
  }
  if (flag == false)
    cout << "NO" << endl;
  else
    cout << "YES" << endl;
  return 0;
}
