#include <bits/stdc++.h>
using namespace std;
int N;
int f[105];
string s[105];
int main() {
  scanf("%d", &N);
  for (int i = 1; i <= N; i++) cin >> f[i];
  bool tag = 1;
  getchar();
  for (int i = 1; i <= N; i++) {
    getline(cin, s[i]);
    s[i] += " ";
    int len = s[i].length();
    int cnt = 0;
    for (int j = 0; j < len; j++) {
      if (s[i][j] == 'a' || s[i][j] == 'e' || s[i][j] == 'i' ||
          s[i][j] == 'o' || s[i][j] == 'u' || s[i][j] == 'y')
        cnt++;
    }
    if (cnt != f[i]) tag = 0;
  }
  if (tag)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
