#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void rread(T& num) {
  num = 0;
  T f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') num = num * 10 + ch - '0', ch = getchar();
  num *= f;
}
const long long inf = 1e16;
const int maxn = 1e3 + 6, mod = 1e9 + 7;
const long double PI = acos(-1.0);
long long gcd(long long a, long long b) { return (a ? gcd(b % a, a) : b); }
void exgcd(long long a, long long b, long long& d, long long& x, long long& y) {
  if (!b) {
    d = a;
    x = 1;
    y = 0;
  } else {
    exgcd(b, a % b, d, y, x);
    y -= x * (a / b);
  }
}
long long power(long long a, long long n) {
  long long p = 1;
  while (n > 0) {
    if (n % 2) {
      p = p * a;
    }
    n >>= 1;
    a *= a;
  }
  return p;
}
long long power(long long a, long long n, long long mod) {
  long long p = 1;
  while (n > 0) {
    if (n % 2) {
      p = p * a;
      p %= mod;
    }
    n >>= 1;
    a *= a;
    a %= mod;
  }
  return p % mod;
}
int n, m, t;
int a[maxn];
string s[maxn];
char v[10] = {'a', 'e', 'i', 'o', 'u', 'y'};
int main() {
  while (cin >> n) {
    for (int i = 1; i <= n; i++) cin >> a[i];
    getchar();
    for (int i = 1; i <= n; i++) getline(cin, s[i]);
    int f = 1;
    for (int i = 1; i <= n; i++) {
      int cun = 0;
      for (int j = 0; j < s[i].size(); j++) {
        for (int g = 0; g <= 5; g++)
          if (s[i][j] == v[g]) {
            cun++;
          }
      }
      if (cun != a[i]) f = 0;
    }
    if (f == 1)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
