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.util.*;
import java.util.Map.Entry;


public class  gym{
	static int mod=(int)1e9+7;
	static int[][]nck;
	static int nck(int n,int k) {
		if(n<k)return 0;
		if(nck[n][k]!=-1)return nck[n][k];
		if(n==k || k==0)return nck[n][k]=1;
		return nck[n][k]=(nck(n-1,k)+nck(n-1, k-1))%mod;
	}
	public static void main(String[] args) throws Exception{
		MScanner sc=new MScanner(System.in);
		PrintWriter pw=new PrintWriter(System.out);
		int n=sc.nextInt();
		int[]in=sc.takearr(n);
		HashMap<Integer, Integer>primeDiv=new HashMap<Integer, Integer>();
		for(int i:in) {
			int x=i;
			
			int p=2;
			while(p*1l*p<=x) {
				while(x%p==0) {
					x/=p;
					primeDiv.put(p, primeDiv.getOrDefault(p, 0)+1);
				}
				p++;
			}
			if(x>1)
				primeDiv.put(x, primeDiv.getOrDefault(x, 0)+1);
		}
		long ans=1;
		nck=new int[30*501][501];
		for(int[]i:nck)Arrays.fill(i, -1);
		
		for(Entry<Integer, Integer>e:primeDiv.entrySet()) {
			int occ=e.getValue();
			
			long mul=0;
			for(int positions=1;positions<=n && positions<=occ;positions++) {
				long possiblePositions=nck(n, positions);
				long fillPositions=nck(occ-1, positions-1);
				
				long inc=(possiblePositions*fillPositions)%mod;
				mul=(mul+inc)%mod;
			}
			ans=(ans*mul)%mod;
		}
		pw.println(ans);
		pw.flush();
	}
	static class MScanner {
		StringTokenizer st;
		BufferedReader br;
		public MScanner(InputStream system) {
			br = new BufferedReader(new InputStreamReader(system));
		}
 
		public MScanner(String file) throws Exception {
			br = new BufferedReader(new FileReader(file));
		}
 
		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}
		public int[] takearr(int n) throws IOException {
	        int[]in=new int[n];for(int i=0;i<n;i++)in[i]=nextInt();
	        return in;
		}
		public long[] takearrl(int n) throws IOException {
	        long[]in=new long[n];for(int i=0;i<n;i++)in[i]=nextLong();
	        return in;
		}
		public Integer[] takearrobj(int n) throws IOException {
	        Integer[]in=new Integer[n];for(int i=0;i<n;i++)in[i]=nextInt();
	        return in;
		}
		public Long[] takearrlobj(int n) throws IOException {
	        Long[]in=new Long[n];for(int i=0;i<n;i++)in[i]=nextLong();
	        return in;
		}
		public String nextLine() throws IOException {
			return br.readLine();
		}
 
		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}
 
		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}
 
		public char nextChar() throws IOException {
			return next().charAt(0);
		}
 
		public Long nextLong() throws IOException {
			return Long.parseLong(next());
		}
 
		public boolean ready() throws IOException {
			return br.ready();
		}
 
		public void waitForInput() throws InterruptedException {
			Thread.sleep(3000);
		}
	}
}