#include <bits/stdc++.h>
using namespace std;
void past_code();
int p[101];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  bool b = true;
  int x, c = 0;
  string s;
  cin >> x;
  int *y = new int[x];
  for (int i = 0; i < x; i++) cin >> y[i];
  cin.ignore();
  for (int i = 0; i < x; i++) {
    c = 0;
    getline(cin, s);
    for (int j = 0; j < s.length(); j++) {
      if (s[j] == 'a' || s[j] == 'e' || s[j] == 'i' || s[j] == 'o' ||
          s[j] == 'u' || s[j] == 'y')
        c++;
    }
    if (c != y[i]) b = false;
  }
  cout << (b ? "YES\n" : "NO\n");
  return 0;
}
