#include <bits/stdc++.h>
using namespace std;
int a[10006];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  bool f = 0;
  for (int i = 0; i < n + 1; i++) {
    string s;
    getline(cin, s);
    if (i == 0) continue;
    int cnt = 0;
    for (int 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[i - 1]) {
    } else {
      f = 1;
    }
  }
  if (f == 0) {
    cout << "YES";
  } else {
    cout << "NO";
  }
  return 0;
}
