#include <bits/stdc++.h>
using namespace std;
ifstream fi("test.txt");
ofstream fo("out.txt");
const long long MOD = 1e9 + 7;
const long long base = 269;
const int ooi = 1 << 30;
const int N = 1e5 + 5;
long long n, m, q, k, pos, rs, t, T, cnt, rs1;
long long maxx = -1e9, minn = 1e9;
long long a[N], b[N];
string vowel = "aeiouy";
int main() {
  string s;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  getline(cin, s);
  for (int i = 0; i < n; i++) {
    getline(cin, s);
    for (int j = 0; j < s.length(); j++)
      if (s[j] == 'a' || s[j] == 'o' || s[j] == 'i' || s[j] == 'u' ||
          s[j] == 'e' || s[j] == 'y')
        b[i]++;
  }
  for (int i = 0; i < n; i++)
    if (b[i] != a[i]) {
      cout << "NO";
      return 0;
    }
  cout << "YES";
}
