#include <bits/stdc++.h>
using namespace std;
const long double pi = 3.1415926535897932384626433832795l;
template <typename T>
inline auto sqr(T x) -> decltype(x * x) {
  return x * x;
}
template <typename T1, typename T2>
inline bool umx(T1& a, T2 b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <typename T1, typename T2>
inline bool umn(T1& a, T2 b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
const int N = 110;
int a[N];
string s;
int n;
const char c[6] = {'a', 'e', 'i', 'o', 'y', 'u'};
bool good(char cc) {
  for (int i = int(0); i < int(6); ++i) {
    if (cc == c[i]) return 1;
  }
  return 0;
}
int main() {
  cout.setf(ios::showpoint | ios::fixed);
  cout.precision(20);
  cin >> n;
  for (int i = int(0); i < int(n); ++i) cin >> a[i];
  getline(cin, s);
  bool ok = 1;
  for (int i = int(0); i < int(n); ++i) {
    getline(cin, s);
    int kol = 0;
    for (int j = int(0); j < int(((int)(s).size())); ++j) {
      if (good(s[j])) {
        kol++;
      }
    }
    if (kol != a[i]) {
      ok = 0;
    }
  }
  if (ok) {
    puts("YES");
  } else {
    puts("NO");
  }
  return 0;
}
