#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int long long n;
  cin >> n;
  vector<int long long> a(n);
  for (long long i = 0; i < n; i++) cin >> a[i];
  string b;
  getline(cin, b);
  for (long long i = 0; i < n; i++) {
    b = "";
    getline(cin, b);
    int long long x = 0;
    for (long long j = 0; j < b.size(); j++)
      if (b[j] == 'a' || b[j] == 'e' || b[j] == 'i' || b[j] == 'o' ||
          b[j] == 'y' || b[j] == 'u')
        x++;
    if (x != a[i]) {
      cout << "NO\n";
      return 0;
    }
  }
  cout << "YES\n";
}
