#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <algorithm>
#include <climits>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <vector>
#include <list>
#define rep(i,m,n) for(i=m;i<=n;i++)
#define rsp(it,s) for(set<int>::iterator it=s.begin();it!=s.end();it++)
#define mod 2009
#define INF 9999999999999
#define vi vector<int>
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define pi acos(-1.0)
#define pii pair<int,int>
#define Lson L, mid, rt<<1
#define Rson mid+1, R, rt<<1|1
const int maxn=5e2+10;
using namespace std;
typedef long long ll;
ll gcd(ll p,ll q){return q==0?p:gcd(q,p%q);}
ll qpow(ll p,ll q){ll f=1;while(q){if(q&1)f=f*p;p=p*p;q>>=1;}return f;}
ll my_min(ll x,ll y){ return x>y?y:x;};
int main()
{
int n;
char t[1005];
int a[105];
char str[105][1005];
char word[105][105];
while(gets(t)!=NULL)
{
n=0;
for(int j=strlen(t)-1;j>=0;j--)
{
n += ((int)pow(10,j))*(t[strlen(t)-j-1]-'0');
}
int flag ;
int i,t1=0;
int num,num1;
int wordnum=0;
int wordlen=0;
memset(a,0,sizeof(a));
memset(str,0,sizeof(str));
memset(word,0,sizeof(word));
gets(t);
for(int j=0;j<=strlen(t);j++)
{
if(t[j]==' '||t[j]=='\0')
{
wordnum++;
wordlen = '\0';
wordlen=0;
j++;
}
word[wordnum][wordlen++] = t[j];
}
for(i=0;i<wordnum;i++)
{
//puts(word[i]);
int temp=0;
for(int j=strlen(word[i])-1;j>=0;j--)
{
temp += ((int)pow(10,j))*(word[i][strlen(word[i])-j-1]-'0');
}
a[i] = temp;
}
for(i=1;i<=n;i++)
{
gets(str[i]);
}
for(i=1;i<=n;i++)
{
int k=0;
int re = 0;
int re1= 0;
wordnum=0;
wordlen=0;
int len = strlen(str[i]);
memset(word,0,sizeof(word));
for(int j=0;j<=len;j++)
{
if(str[i][j]==' '||str[i][j]=='\0')
{
wordnum++;
wordlen = '\0';
wordlen=0;
j++;
}
word[wordnum][wordlen++] = str[i][j];
}
for(int j=0;j<wordnum;j++)
{
for(int k=0;k<strlen(word[j]);k++)
{
if(word[j][k]=='a'||word[j][k]=='e'||
word[j][k]=='i'||word[j][k]=='o'||word[j][k]=='u'||word[j][k]=='y')
re++;
}
}
if(re != a[i-1])
break;
}
if(i==n+1)
printf("YES\n");
else
printf("NO\n");
}
return 0;
}