You are given an integer m as a product of integers a1, a2, ... an <image>. Your task is to find the number of distinct decompositions of number m into the product of n ordered positive integers.

Decomposition into n products, given in the input, must also be considered in the answer. As the answer can be very large, print it modulo 1000000007 (109 + 7).

Input

The first line contains positive integer n (1 ≤ n ≤ 500). The second line contains space-separated integers a1, a2, ..., an (1 ≤ ai ≤ 109).

Output

In a single line print a single number k — the number of distinct decompositions of number m into n ordered multipliers modulo 1000000007 (109 + 7).

Examples

Input

1
15


Output

1


Input

3
1 1 2


Output

3


Input

2
5 7


Output

4

Note

In the second sample, the get a decomposition of number 2, you need any one number out of three to equal 2, and the rest to equal 1.

In the third sample, the possible ways of decomposing into ordered multipliers are [7,5], [5,7], [1,35], [35,1].

A decomposition of positive integer m into n ordered multipliers is a cortege of positive integers b = {b1, b2, ... bn} such that <image>. Two decompositions b and c are considered different, if there exists index i such that bi ≠ ci.
import java.util.*;
import java.io.*;
import java.math.BigInteger;

public class counting {

	static long fac[];
	static long facInv[];
	static HashMap<Integer, Integer> hm;
	static ArrayList<Integer> primes;
	
	
	 public static void primeFactors(int n) 
	    { 
	        // Print the number of 2s that divide n 
		 
		 	if(n == 1)
		 		return;
	        while (n%2==0) 
	        { 
	            hm.put(2, hm.getOrDefault(2, 0)+1);
	            n /= 2; 
	        } 
	  
	        // n must be odd at this point.  So we can 
	        // skip one element (Note i = i +2) 
	        for (int i = 3; i <= Math.sqrt(n); i+= 2) 
	        { 
	            // While i divides n, print i and divide n 
	            while (n%i == 0) 
	            { 
	            	hm.put(i, hm.getOrDefault(i, 0)+1);
	                n /= i; 
	            } 
	        } 
	  
	        // This condition is to handle the case when 
	        // n is a prime number greater than 2 
	        if (n > 2) 
	        	hm.put(n, hm.getOrDefault(n, 0)+1);
	    } 
	static long power(long a, long x, long p) 
    { 
          
		long res = 1l;
	    while(x > 0) {
	        if( x % 2 != 0) {
	            res = (res * a) % p;
	        }
	        a = (a * a) % p;
	        x /= 2;
	    }
	    return res;
    } 
      
    // Returns n^(-1) mod p 
    static long modInverse(long n, int p) 
    { 
        return power(n, p-2l, p); 
    } 
      
    // Returns nCr % p using Fermat's 
    // little theorem. 
    static long nCrModPFermat(int n, int r, 
                                    int p) 
    { 
          
        // Base case 
        if (r == 0) 
            return 1l; 

      
        return (fac[n]* facInv[r] % p * facInv[n-r] % p) % p;  
    } 
    
	public static void main(String[] args)throws IOException{
		
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter out = new PrintWriter(System.out);
		
		int p = 1000000007;
		
		fac = new long[100000+1]; 
		facInv = new long[100000+1];
		
	    fac[0] = 1l; 
	    facInv[0] = modInverse(fac[0], p);
	    
	    for(int i = 1 ;i < fac.length; i++)
	    {
	        fac[i] = fac[i-1] * i % p; 
	        facInv[i] = modInverse(fac[i], p);
	    }
	    
		
	    int n = Integer.parseInt(br.readLine());

	    hm = new HashMap<>();
	    
	    StringTokenizer st1 = new StringTokenizer(br.readLine());
	    
	    for(int i = 0 ; i < n ; i++)
	    	primeFactors(Integer.parseInt(st1.nextToken()));
	    
	    //Object[] keys = hm.keySet().toArray();
	    Object[] values = hm.values().toArray();	
	   
	    long res = 1l;
	    
	    BigInteger bg = new BigInteger("1");
	    for(int i = 0 ; i < values.length ; i++)
	    {
	    	bg = bg.multiply(new BigInteger(nCrModPFermat((Integer)values[i] + n - 1, n-1, p) + ""));
	    }
	    bg = bg.mod(new BigInteger(p + ""));
	    out.println(bg);
		
		out.flush();
		out.close();
		
	}

}
