#include <bits/stdc++.h>
using namespace std;
char buffer[150];
int arr[100];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> arr[i];
  cin.getline(buffer, 150);
  bool valid = true;
  for (int i = 0; i < n; i++) {
    cin.getline(buffer, 150);
    int cnt = 0;
    for (int j = 0; buffer[j]; j++) {
      switch (buffer[j]) {
        case 'a':
        case 'e':
        case 'i':
        case 'o':
        case 'u':
        case 'y':
          cnt++;
      }
    }
    if (cnt != arr[i]) {
      valid = false;
      break;
    }
  }
  if (valid)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
