#include <bits/stdc++.h>
using namespace std;
struct $ {
  $() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
  }
} $;
int main() {
  int n;
  cin >> n;
  vector<int> s(n);
  for (auto &ss : s) cin >> ss;
  string str;
  getline(cin, str);
  bool ok = true;
  for (int i = 0; i < n; ++i) {
    getline(cin, str);
    int cnt = 0;
    for (char c : str) {
      switch (c) {
        case 'a':
        case 'e':
        case 'i':
        case 'o':
        case 'u':
        case 'y':
          ++cnt;
      }
    }
    if (cnt != s[i]) ok = false;
  }
  cout << (ok ? "YES\n" : "NO\n");
  return 0;
}
