You are given a text consisting of n lines. Each line contains some space-separated words, consisting of lowercase English letters.

We define a syllable as a string that contains exactly one vowel and any arbitrary number (possibly none) of consonants. In English alphabet following letters are considered to be vowels: 'a', 'e', 'i', 'o', 'u' and 'y'.

Each word of the text that contains at least one vowel can be divided into syllables. Each character should be a part of exactly one syllable. For example, the word "mamma" can be divided into syllables as "ma" and "mma", "mam" and "ma", and "mamm" and "a". Words that consist of only consonants should be ignored.

The verse patterns for the given text is a sequence of n integers p1, p2, ..., pn. Text matches the given verse pattern if for each i from 1 to n one can divide words of the i-th line in syllables in such a way that the total number of syllables is equal to pi.

You are given the text and the verse pattern. Check, if the given text matches the given verse pattern.

Input

The first line of the input contains a single integer n (1 ≤ n ≤ 100) — the number of lines in the text.

The second line contains integers p1, ..., pn (0 ≤ pi ≤ 100) — the verse pattern.

Next n lines contain the text itself. Text consists of lowercase English letters and spaces. It's guaranteed that all lines are non-empty, each line starts and ends with a letter and words are separated by exactly one space. The length of each line doesn't exceed 100 characters.

Output

If the given text matches the given verse pattern, then print "YES" (without quotes) in the only line of the output. Otherwise, print "NO" (without quotes).

Examples

Input

3
2 2 3
intel
code
ch allenge


Output

YES


Input

4
1 2 3 1
a
bcdefghi
jklmnopqrstu
vwxyz


Output

NO


Input

4
13 11 15 15
to be or not to be that is the question
whether tis nobler in the mind to suffer
the slings and arrows of outrageous fortune
or to take arms against a sea of troubles


Output

YES

Note

In the first sample, one can split words into syllables in the following way: 
    
    
    in-tel  
    co-de  
    ch al-len-ge  
    

Since the word "ch" in the third line doesn't contain vowels, we can ignore it. As the result we get 2 syllabels in first two lines and 3 syllables in the third one.
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;

public class Solution {

  static  ArrayList<Integer> ans = new ArrayList<Integer>();
    
    public static void main(String[] args) throws Exception{
        //Scanner in = new Scanner(System.in);
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(System.out);
        
        
        int n = Integer.parseInt(in.readLine());
        String s[] = in.readLine().split(" ");
        boolean flag = true;
        
        for(int j=0;j<n;j++){
            
            int x = Integer.parseInt(s[j]);
            
            String s1 = in.readLine();
            int cnt = 0;
            for(int i=0;i<s1.length();i++){
                
                if(s1.charAt(i)==' ')
                {
                    
                    
                }
                
                else if(s1.charAt(i)=='a' || s1.charAt(i)=='e' || s1.charAt(i)=='i' || s1.charAt(i)=='o' || s1.charAt(i)=='u' || s1.charAt(i)=='y'){
                    
                    cnt++;
                }
                
            }
            if(cnt!=x){
                flag = false;
            }
        }
        
        if(flag)
            out.println("YES");
        else
            out.println("NO");
        
        out.close();
    }
}

     /*
         String s[] = in.readLine().split(" ");
        int a = Integer.parseInt(s[0]);
        int b = Integer.parseInt(s[1]);
        int c = Integer.parseInt(s[2]);
        
        boolean visited[] = new boolean[a+1];
        int time[][] = new int[a+1][a+1];
        
        ArrayList<Integer> arr[] = new ArrayList[a+1];
        
        for(int i=1;i<=a;i++)
			arr[i] = new ArrayList<>();


		for(int i=1;i<=b;i++){

			String ss1[] = in.readLine().split(" ");

			int x = Integer.parseInt(ss1[0]);
			int y = Integer.parseInt(ss1[1]);
            int z = Integer.parseInt(ss1[2]);
            
			arr[x].add(y);
			arr[y].add(x);

            time[x][y] = x;
		}

             int count = 0;
        
			 DFS(1,visited,arr,time);
             
        out.println(ans);
	  out.close();	
    }
          


	public static void  DFS(int n,boolean visited[],ArrayList<Integer> arr[] ,int time[][]){

		//System.out.println(n);
        ans.add(n);
		visited[n] = true;


		Iterator<Integer> ii = arr[n].listIterator();

        int minY = Integer.MAX_VALUE;
        int minT = Integer.MAX_VALUE;
        
		while(ii.hasNext())
		{
           
			int x = ii.next();
			if(!visited[x])
			{
                
               if(time[n][x]<minT){
                   minY = x;
                   minT = time[n][x];
               }  
	//			DFS(x,visited);
			}

		}
        DFS(minY,visited,arr,time);
        

	}
}
     
     */
        
       /* 
        ArrayList<Pair> arr = new ArrayList<Pair>();
        
        for(int i=0;i<a;i++){
            String s1 = in.readLine();
            Pair p = new Pair(s1,s1.length());
            arr.add(p);
        }
        String ans = in.readLine();
        int len = ans.length();
        
        Collections.sort(arr, new sorting());
        int count = 0;
        //out.println(arr);
        for(int i=0;i<arr.size();i++){
            
            int len1 = arr.get(i).b;
            if(len1<len)
                continue;
            else if(len==len1)
            {
                count = i;
                break;
            }
        }
        
        int temp = count;
        count = count/k;
        count = count*5;
        count += temp + 1;
        
         int i = 0;
        
        for(i=0;i<arr.size();i++){
            
            int len1 = arr.get(i).b;
            if(len1>len)
                break;
                
        }
        int count1 = i-1;
        //out.println(count1 + "count");
        int count2 = count1;
        count1 = count1/k;
        count1 = count1*5;
        count1 += count2 + 1;
        
        out.println(count + " " +count1);
        //out.println(count1);
        out.close();
    }
    
    static class Pair{
        
        String a;
        int b;
        
        Pair(String  a, int b){
            this.a = a;
            this.b = b;
        }
        
    }
    
    static class sorting implements Comparator<Pair>{
        
        @Override
        public int compare(Pair p1, Pair p2){
            
            return p1.b-p2.b;
            
        }
        
    }
    
}
       
       */
       
        /*
        
        int n = Integer.parseInt(in.readLine());
        String s = in.readLine();
        int len = s.length();
        ArrayList<Integer> arr = new ArrayList<Integer>();
          int count = 0;
        for(int i=0;i<len;i++){
            
            int start = i;
            if(s.charAt(i)=='B'){
                //int start  = i ;
                count++;
                i++;
                while(i<len && s.charAt(i)=='B')
                    i++;
                
            }
            int end = i;
            
            if(end-start>0)
                arr.add(end-start);
           
            
        }
         
            if(arr.size()==0)
                out.println(count);
            
            else{
                
                out.println(count);
                for(Integer ii : arr)
                    out.print(ii + " ");
            }
            
        
        out.close();
    }
}
*/
        /*
        
        int a = Integer.parseInt(in.readLine());
        int arr[] = new int[a];
        String s1 = in.readLine();
        boolean flag = false;
      //  int cc[] = new int[s1.length()];
        StringBuilder res = new StringBuilder();
        int j = 0;
        for(char c : s1.toCharArray())
        {
            if(c=='b')
                res.append("0");
            else 
               res.append("1");
            
        }    
        int count = 0;
        for(int i=0;i<s1.length();i++){
            if(res.charAt(i)=='0')
                count++;
        }
      
        if(count==a){
            out.println(count/2);
            out.close();
            return;
        }
           
        count = 0;
        
        for(int i=0;i<s1.length();i++){
             if(res.charAt(i)=='1')
                count++;
        }
      
         if(count==a){
            out.println(count/2);
            out.close();
            return;
        }
           
        StringBuilder ss = new StringBuilder();
        int ans = 0;
        int ans1 = 0;
        
        for(int i=0;i<s1.length();i++){
            
            if(i%2==0)
                ss = ss.append("0");
            else
                ss = ss.append("1");
        }
       // out.println(ss.toString());
       // String s2 = new String(cc);
        for(int i=0;i<s1.length();i++){
          // out.println(cc[i]+ "" +ss.toString().charAt(i));
            
            if(res.toString().charAt(i)!=ss.toString().charAt(i))
                ans++;
            
        }
        out.println(res.toString());
        out.println(ss.toString());
        ss = new StringBuilder("");
        
        for(int i=0;i<s1.length();i++){
            
            if(i%2==0)
                ss = ss.append("1");
            else
                ss = ss.append("0");
        }
       
          out.println(ss.toString());
        for(int i=0;i<s1.length();i++){
        //    out.print(cc[i]+ "");
          //   out.println(cc[i]+ "" +ss.toString().charAt(i));
            if(res.toString().charAt(i)!=ss.toString().charAt(i))
                ans1++;
            
        }
      //  out.println(ans);
        //out.println(ans1);
        if(ans==0 || ans1==0)
            out.println("0");
        else
            out.println(Math.min(ans,ans1)-1);
        out.close();
        
    }
    
}
*/

        /*
        
        String s = in.readLine();
        s = s.trim().toLowerCase();
        int len = s.length();
        int freq[] = new int[26];
        if(len<26)
            out.println("-1");
        
        else if(len>26){
        
          //  out.println(len);
            boolean flag = false;
                             boolean flag1 = false;
            int j = 0;
            int count = 0;
            
            for(int i=0;i<len;i++){
                
                if(s.charAt(i)=='?')
                    count++;
                
                if(s.charAt(i)!='?'){
                freq[s.charAt(i)-'a']++;
                count++;
                }
                
                if(s.charAt(i)!='?' && freq[s.charAt(i)-'a']>1){
                    
                    while(freq[s.charAt(i)-'a']!=1)
                    {
                        j++;
                        count--;
                        freq[s.charAt(i)-'a']--;
                      //  s = s.substring(0,i) + 'a' + s.substring(i);
                        //out.println(s);
                    }
                    
                }
                
            //   out.println("count" + count + " " + j + "i " + i);

            if(count==26){
                
            flag = true;
            HashSet<Character> set = new HashSet<Character>();
              //HashSet<Character> set1 = new HashSet<Character>();
            ArrayList<Character> set1 = new ArrayList<Character>();
           
            for(int l=j;l<i+1;l++)
            {
                char c = s.charAt(l);
                
                if(c=='?')
                    continue;
               
                else{
                    if(set.contains(c))
                    {
                        out.println("-1");
                        flag1 = true;
                        break;
                    }
                    set.add(c);
                    
                }
            }
            
            String s1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
            s1 = s1.toLowerCase();
            
            for(char c : s1.toCharArray())
            {
                if(!set.contains(c))
                    set1.add(c);
            }
            
            for(int l=j;l<i+1;l++){
                
                if(s.charAt(l)!='?')
                    continue;
                else{
                   // out.println(s.substring(0,i) + "0 to i");
                   // out.println(s.substring(i+1) + "i");
                   // out.println(set1.get(0) + " set ");
                    s = s.substring(0,l) + set1.remove(0) + s.substring(l+1);
                    
                }
            }
                j = i+1;
                count = 0;
                Arrays.fill(freq,0);
                set.clear();
                set1.clear();
                }
                
            }
            if(flag && !s.contains("?"))
                out.println(s.toUpperCase());
            else if(!flag1)
                out.println("-1");
        }
        else if(len==26){
            
            HashSet<Character> set = new HashSet<Character>();
              //HashSet<Character> set1 = new HashSet<Character>();
            ArrayList<Character> set1 = new ArrayList<Character>();
            s = s.toLowerCase(); 
            for(char c:s.toCharArray())
            {
                if(c=='?')
                    continue;
               
                else{
                    if(set.contains(c))
                    {
                        out.println("-1");
                        break;
                    }
                    set.add(c);
                    
                }
            }
            
            String s1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
            s1 = s1.toLowerCase();
            for(char c : s1.toCharArray())
            {
                if(!set.contains(c))
                    set1.add(c);
            }
            
            for(int i=0;i<len;i++){
                
                if(s.charAt(i)!='?')
                    continue;
                else{
                   // out.println(s.substring(0,i) + "0 to i");
                   // out.println(s.substring(i+1) + "i");
                   // out.println(set1.get(0) + " set ");
                    s = s.substring(0,i) + set1.remove(0) + s.substring(i+1);
                    
                }
            }
            
            out.println(s.toUpperCase());
          
        }
       out.close();
               
    }
}

*/
        
        
/*
        String s1[] = in.readLine().split(" ");
        int a = Integer.parseInt(s1[0]);
        int b = Integer.parseInt(s1[1]);
        
        int arr[] = new int[a];
        String ss[] = in.readLine().split(" ");
        
        for(int i=0;i<a;i++){
            arr[i] = Integer.parseInt(ss[i]);
        }
        
        int count = 0;
        
        for(int i=0;i<a-1;i++){
            
            if(Math.abs(arr[i]-arr[i+1])<=b)
               count++;
            
            else
                count = 0;
        }
        
        
        System.out.println(count+1);
        
    }
}
*/
        
  /*
        int t = in.nextInt();
        
        while(t-->0){
      
      long r = in.nextInt();
       long s = in.nextInt();
       long p = in.nextInt();
        long sum = 1;
            long ans = -1;
        for(int i=1;i<p;i++){
            
            sum += (Math.pow(r,i)%p);
           // System.out.println(sum);
            if((sum%p) == s%p)
            {
                ans = i+1;
                break;
            }
        }    
            
        
     
       System.out.println(ans);
    }
    }
}
*/
      /*  for(int i=0;i<n;i++){
            arr[i] = in.nextInt();
        }
        
        int min = Integer.MAX_VALUE;
        
        for(int i=0;i<n;i++){
            
            if(arr[i] >= n-i){
                
                min = Math.min(i,min);
            }
        }   
        
        System.out.println(min+1);
        
    }
}
        
        */
    
/*
        int n = in.nextInt();
        //int m = in.nextInt();
        int arr[] = new int[n+1];
        int arr1[] = new int[n+1];
        
        for(int i=1;i<=n;i++){
            arr[i] = in.nextInt();
        }
        
        for(int i=1;i<=n;i++){
            arr1[i] = in.nextInt();
        }
        
        int freq[] = new int[n+1];
        int n1 = -1;
        int n2 = -1;
        boolean flag = false;
        
        for(int i=1;i<=n;i++){
                   

            if(freq[arr[i]]>0 && !flag){
               // System.out.println(i);       
                n2 = i;
                n1 = arr[i];
                flag = true;
            }
            freq[arr[i]]++;
        }
                

        int miss = -1;
        int repeat = -1;
    flag = false;
        for(int i=1;i<=n;i++){
            if(arr[i]==n1 && i!=n2 && !flag){
                n1 = i;
                //System.out.println(n1 + " " +n2);       
                repeat = arr[i];
                flag = true;

            }
            if(freq[i]==0)
                miss = i;
        }
        

        arr[n1] = miss;
        
        int count = 0;
        
        for(int i=1;i<=n;i++){
            
            if(arr[i] != arr1[i])
                count++;
        }
        
        if(count>1){
            arr[n1] = repeat;
            arr[n2] = miss;
        }
        
        for(int i=1;i<=n;i++){
            System.out.print(arr[i] + " ");
        }
    }
}
*/
        