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.*;
public final class decomposition
{
    static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
	static FastScanner sc=new FastScanner(br);
    static PrintWriter out=new PrintWriter(System.out);
	static Random rnd=new Random();
	static long mod=(long)(1e9+7);
	static long[] fact,inv_fact;
	static int maxn=(int)(2e5)+10,max_val=(int)(1e5)+3;
	static Map<Integer,Integer> m1=new HashMap<>();
	
	static long pow(long a,long b)
	{
		long x=1,y=a%mod;
		while(b>0)
		{
			if(b%2==1)
			{
				x=(x*y)%mod;
			}
			y=(y*y)%mod;b=b/2L;
		}
		return x;
	}
	
	static void build()
	{
		fact=new long[maxn];inv_fact=new long[maxn];fact[0]=1;
		for(int i=1;i<maxn;i++)
		{
			fact[i]=(fact[i-1]*i)%mod;
		}
		inv_fact[maxn-1]=pow(fact[maxn-1],mod-2);
		for(int i=maxn-2;i>=0;i--)
		{
			inv_fact[i]=(inv_fact[i+1]*(i+1))%mod;
		}
	}
	
	static void put(int num,int val)
	{
		if(m1.get(num)==null)
			m1.put(num,val);
		else
			m1.put(num,m1.get(num)+val);
	}
	
	static long nCr(int n,int r)
	{
		long val1=fact[n],val2=inv_fact[r],val3=inv_fact[n-r],val4=(val2*val3)%mod;
		return (val1*val4)%mod;
	}
	
	static int check(int j)
	{
		return (j==2?1:2);
	}
	
    public static void main(String args[]) throws Exception
    {
		build();int n=sc.nextInt();int[] a=new int[n];
		for(int i=0;i<n;i++)
		{
			a[i]=sc.nextInt();
		}
		for(int i=0;i<n;i++)
		{
			int curr=a[i];
			for(int j=2;j<max_val;j+=(check(j)))
			{
				if(curr%j==0)
				{
					int cnt=0;
					while(curr>1 && curr%j==0)
					{
						curr/=j;cnt++;
					}
					put(j,cnt);
				}
			}
			if(curr>1)
			{
				put(curr,1);
			}
		}
		long res=1;
		for(Map.Entry<Integer,Integer> en:m1.entrySet())
		{
			int cnt=en.getValue();long curr=nCr(n+cnt-1,cnt);res=(res*curr)%mod;
		}
		out.println(res);out.close();
    }
}
class FastScanner
{
    BufferedReader in;
    StringTokenizer st;

    public FastScanner(BufferedReader in) {
        this.in = in;
    }
	
    public String nextToken() throws Exception {
        while (st == null || !st.hasMoreTokens()) {
            st = new StringTokenizer(in.readLine());
        }
        return st.nextToken();
    }
	
	public String next() throws Exception {
		return nextToken().toString();
	}
	
    public int nextInt() throws Exception {
        return Integer.parseInt(nextToken());
    }

    public long nextLong() throws Exception {
        return Long.parseLong(nextToken());
    }

    public double nextDouble() throws Exception {
        return Double.parseDouble(nextToken());
    }
}