#include <bits/stdc++.h>
using namespace std;
int p[105];
char s[105];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> p[i];
  }
  getchar();
  char c;
  for (int i = 0; i < n; i++) {
    int ans = 0;
    while (1) {
      scanf("%s", s);
      int len = strlen(s);
      for (int i = 0; i < len; i++) {
        if (s[i] == 'a' || s[i] == 'e' || s[i] == 'i' || s[i] == 'o' ||
            s[i] == 'u' || s[i] == 'y')
          ans++;
      }
      c = getchar();
      if (c == '\n') {
        if (ans != p[i]) {
          cout << "NO" << '\n';
          return 0;
        }
        break;
      }
    }
  }
  cout << "YES" << '\n';
  return 0;
  return 0;
}
