#include <bits/stdc++.h>
const int INF = ~0U >> 1;
using namespace std;
int a[102], has[200];
int main() {
  int n;
  has['a'] = has['e'] = has['i'] = has['o'] = has['u'] = has['y'] = 1;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  string s;
  int num = 0;
  getline(cin, s);
  for (int i = 1; i <= n; i++) {
    num = 0;
    getline(cin, s);
    for (int j = 0; j < s.size(); j++) {
      if (has[s[j]]) num++;
    }
    if (num != a[i]) return (printf("NO\n")), 0;
  }
  cout << "YES\n";
  return 0;
}
