#include <bits/stdc++.h>
using namespace std;
bool* sieve() {
  bool* arr = new bool[10000001];
  for (int i = 0; i < 10000000; i++) arr[i] = true;
  for (int i = 2; i * i < 10000000; i++) {
    if (arr[i]) {
      for (int p = i * 2; p <= 10000000; p += i) arr[p] = false;
    }
  }
  return arr;
}
struct Node {
  int data;
  Node* next;
};
bool is_plaindrom_number(long long number) {
  long long reversed_number = 0;
  long long temp = number;
  while (temp > 0) {
    int reminder = temp % 10;
    reversed_number = (reversed_number * 10) + reminder;
    temp /= 10;
  }
  if (number == reversed_number) return true;
  return false;
}
bool is_max(long long p, long long q, long long prims_count,
            long long plaindroms_count) {
  if (q * prims_count <= p * plaindroms_count) return true;
  return false;
}
long long sum(long long n) {
  long long temp = n * (n + 1);
  temp /= 2;
  return temp;
}
int binary_search(int query_low, int query_high, vector<int> common_divisors) {
  int low = 0;
  int high = common_divisors.size() - 1;
  int mid = 0;
  while (low < high) {
    mid = low + ((high - low) / 2);
    if (common_divisors[mid] > query_high)
      high = mid;
    else if (common_divisors[mid] < query_low)
      low = mid + 1;
    else if (common_divisors[mid] == query_high)
      return mid;
    else
      low = low + 1;
  }
  if (common_divisors[high] >= query_low && common_divisors[high] <= query_high)
    return high;
  else if (common_divisors[mid] >= query_low &&
           common_divisors[mid] <= query_high)
    return mid;
  return low;
}
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
vector<int> prime_factors(long long n) {
  vector<int> results;
  while (n % 2 == 0) {
    results.push_back(2);
    n /= 2;
  }
  for (int i = 3; i <= sqrt(double(n)); i += 2) {
    while (n % i == 0) {
      results.push_back(i);
      n /= i;
    }
  }
  if (n > 2) results.push_back(n);
  return results;
}
long long sum(long long n, long long con) {
  long long sum = 0;
  for (long long i = 1; i <= n; i++) {
    sum += i;
    sum %= con;
  }
  return sum;
}
struct Interval {
  int start;
  int end;
  Interval() : start(0), end(0) {}
  Interval(int s, int e) : start(s), end(e) {}
};
bool cmp(Interval a, Interval b) { return a.start < b.end; }
int locations[30002];
int n, d;
int memo[30002][250];
int func(int current, int step) {
  int new_step = step - (d - 250);
  if (current >= 30001) return 0;
  if (step <= 0) return 0;
  if (memo[current][new_step] != -1) return memo[current][new_step];
  int a = locations[current];
  if (step == 1)
    a +=
        max(func(current + (step + 1), step + 1), func(current + (step), step));
  else
    a += max(func(current + (step - 1), step - 1),
             max(func(current + (step + 1), step + 1),
                 func(current + (step), step)));
  return memo[current][new_step] = a;
}
struct TreeNode {
  int val;
  TreeNode* left;
  TreeNode* right;
  TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};
int findmin(TreeNode* root, int limit, int& mini) {
  if (root == NULL) return 0;
  if (root->val > limit) mini = min(mini, root->val);
  findmin(root->left, limit, mini);
  findmin(root->right, limit, mini);
  return 0;
}
int findSecondMinimumValue(TreeNode* root) {
  if (root == NULL || (root->left == NULL && root->right == NULL)) return -1;
  int first_mini = root->val;
  int temp = findmin(root, -1, first_mini);
  int second_mini = INT_MAX;
  temp = findmin(root, first_mini, second_mini);
  if (second_mini != first_mini) return second_mini;
  return -1;
}
int maximumSwap(int num) {
  stringstream ss;
  ss << num;
  string input;
  ss >> input;
  for (int i = 0; i < input.size() - 1; i++) {
    char maxi = input[i];
    int index = i;
    for (int j = i + 1; j < input.size(); j++) {
      if (input[j] >= maxi) {
        maxi = input[j];
        index = j;
      }
    }
    if (maxi != input[i]) {
      swap(input[i], input[index]);
      break;
    }
  }
  stringstream ss1;
  ss1 << input;
  int output;
  ss1 >> output;
  return output;
}
int countVowls(string input) {
  string vowls = "aeiouy";
  int count = 0;
  for (int i = 0; i < input.size(); i++) {
    int a = vowls.find(input[i]);
    if (a > -1) count++;
  }
  return count;
}
int main() {
  int n;
  while (cin >> n) {
    int arr[10000];
    for (int i = 0; i < n; i++) {
      cin >> arr[i];
    }
    cin.ignore();
    string input;
    bool flag = true;
    for (int i = 0; i < n; i++) {
      getline(cin, input);
      int vowlsCount = countVowls(input);
      if (vowlsCount != arr[i]) flag = false;
    }
    if (flag)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
