#include <bits/stdc++.h>
using namespace std;
int colorArr[1024], V;
bool isBP(int G[][1024], int src) {
  for (int i = 0; i < V; ++i) colorArr[i] = -1;
  colorArr[src] = 1;
  queue<int> q;
  q.push(src);
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    for (int v = 0; v < V; ++v) {
      if (G[u][v] && colorArr[v] == -1) {
        colorArr[v] = 1 - colorArr[u];
        q.push(v);
      } else if (G[u][v] && colorArr[v] == colorArr[u])
        return false;
    }
  }
  return true;
}
long long p(long long a, long long b) {
  long long temp;
  if (b == 0) return 1;
  temp = p(a, b / 2) % 1000;
  if (b & 1)
    return (((a * temp) % 1000) * temp) % 1000;
  else
    return (temp * temp) % 1000;
}
int get_vowels(string str) {
  int l = str.length();
  int i, j = 0;
  for (i = 0; i < l; i++) {
    if (str[i] == 'a' || str[i] == 'e' || str[i] == 'i' || str[i] == 'o' ||
        str[i] == 'u' || str[i] == 'y')
      j++;
  }
  return j;
}
int main() {
  int no, io;
  cin >> no;
  int p[no], q[no];
  for (io = 0; io < no; io++) cin >> p[io];
  getchar();
  string str;
  for (io = 0; io < no; io++) {
    getline(cin, str);
    q[io] = get_vowels(str);
  }
  int fl = 1;
  for (io = 0; io < no; io++)
    if (p[io] != q[io]) fl = 0;
  if (fl == 1)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
