#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n], i;
  for (i = 0; i < n; i++) cin >> a[i];
  int f = 1;
  getchar();
  for (i = 0; i < n; i++) {
    char ch;
    int c = 0;
    while ((ch = getchar()) != '\n' && ch != EOF) {
      if (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u' ||
          ch == 'y')
        c++;
    }
    if (c != a[i]) f = 0;
  }
  if (f)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
