#include <bits/stdc++.h>
using namespace std;
using namespace std;
int a[100005];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  int i, j, k, l;
  cin >> n;
  for (i = 1; i < n + 1; i++) cin >> a[i];
  string p;
  getline(cin, p);
  for (k = 1; k < n + 1; k++) {
    string s;
    getline(cin, s);
    int cnt = 0;
    for (i = 0; i < s.length(); i++) {
      if (s[i] == 'a' || s[i] == 'e' || s[i] == 'i' || s[i] == 'o' ||
          s[i] == 'u' || s[i] == 'y')
        cnt++;
    }
    if (cnt == a[k])
      ;
    else
      break;
  }
  if (k != n + 1)
    cout << "NO";
  else
    cout << "YES";
}
