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.io.*;
import java.math.BigInteger;
import java.util.*;
import java.util.Map.Entry;
public class A {
	static boolean [] isPrime;
	static ArrayList<Integer> primes;
	static TreeMap<Integer, Integer> map;
	public static void main(String[] args)throws Throwable {
		MyScanner sc=new MyScanner();
		PrintWriter pw=new PrintWriter(System.out);
		
		int n=sc.nextInt();
		int [] a=new int [n];
		for(int i=0;i<n;i++)
			a[i]=sc.nextInt();
		map=new TreeMap<Integer, Integer>();
		sieve((int)1e5);
		for(int i=0;i<n;i++)
			primeFactors(a[i]);
		long ans=1L;
		for(Entry<Integer, Integer> e : map.entrySet()){
			int v=e.getValue();
			if(v>0){
				ans=(ans*nCr(v+n-1, n-1))%mod;
			}
		}
		
		pw.println(ans);
		pw.flush();
		pw.close();
	}
	
	public static long inv(long x)
	{
		long r,y;
		for(r=1,y=mod-2;y!=0;x=x*x%mod,y>>=1)
		{
			if((y&1)==1)
				r=r*x%mod;
		
		}
		return r;
	}
	
	static int mod=(int)(1e9+7);
	public static long nCr(int N, int K){
		if(K > N)
			return 0;
		long res = 1L;
		for(int i = 1; i <= K; i++)
			res = ( ( ( ( (N - K + i)%mod+mod)%mod * res%mod)%mod *inv(i))%mod);
		System.err.println(N+" "+K+" "+res);
		return res;
	}
	
	public static void sieve(int N){
		isPrime = new boolean[N+1];
		Arrays.fill(isPrime, true);
		isPrime[0]=isPrime[1]=false;
		primes = new ArrayList<Integer>();

		for (int i = 2; i <= N; ++i)
			if (isPrime[i]){
				primes.add(i);
				if(1l * i * i <= N)
					for (int j = i * i; j <= N; j += i)
						isPrime[j] = false;
			}   
	}
	
	public static void primeFactors(int N){
		int idx = 0, p = primes.get(idx);
		while(p * p <= N){
			while(N % p == 0) {
				if(map.containsKey(p))
					map.put(p, map.get(p)+1);
				else
					map.put(p, 1);
				N /= p; 
			}
			p = primes.get(++idx);
		}
		if(N != 1){
			if(map.containsKey(N))
				map.put(N, map.get(N)+1);
			else
				map.put(N, 1);
		}
	}
	
	static void shuffle(int[] a) {
		int n = a.length;
		for (int i = 0; i < n; i++) {
			int r = i + (int) (Math.random() * (n - i));
			int tmp = a[i];
			a[i] = a[r];
			a[r] = tmp;
		}
	}
	
	static class MyScanner {
		BufferedReader br;
		StringTokenizer st;
		public MyScanner() {br = new BufferedReader(new InputStreamReader(System.in));}
		String next() {while (st == null || !st.hasMoreElements()) {
			try {st = new StringTokenizer(br.readLine());}
			catch (IOException e) {e.printStackTrace();}}
		return st.nextToken();}
		int nextInt() {return Integer.parseInt(next());}
		long nextLong() {return Long.parseLong(next());}
		double nextDouble() {return Double.parseDouble(next());}
		String nextLine(){String str = "";
		try {str = br.readLine();}
		catch (IOException e) {e.printStackTrace();}
		return str;}
	}
}