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 c
{
	public static void main(String[] args) throws IOException
	{
		new c();
	}
	long MOD = 1_000_000_007;
	long[][] memo;
	long choose(int a, int b)
	{
		if(memo[a][b] != -1) return memo[a][b];
		if(a == b || b == 0) return 1;
		return memo[a][b] = (choose(a-1, b-1)+choose(a-1, b))%MOD;
	}
	public c() throws IOException
	{
		FastScanner in = new FastScanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int n = in.nextInt();
		HashMap<Integer, Integer> hm = new HashMap<Integer, Integer>();
		memo = new long[20000][600];
		for(long[] a : memo) Arrays.fill(a, -1);
		for(int i = 0; i < n; i++)
		{
			int v = in.nextInt();
			while(v%2 == 0)
			{
				if(!hm.containsKey(2)) hm.put(2, 0);
				v /= 2;
				hm.put(2, hm.get(2)+1);
			}
			for(int j = 3; (long)j*j <= v; j+=2)
			{
				while(v%j == 0)
				{
					v /= j;
					if(!hm.containsKey(j)) hm.put(j, 0);
					hm.put(j, hm.get(j)+1);
				}
			}
			if(v != 1)
			{
				if(!hm.containsKey(v)) hm.put(v, 0);
				hm.put(v, hm.get(v)+1);
			}
		}
		long ret = 1;
		for(int key : hm.keySet())
		{
			ret *= choose(n-1+hm.get(key), n-1);
			ret %= MOD;
		}
		System.out.println(ret);
		in.close(); out.close();
	}
	
	class FastScanner 
	{
		final BufferedReader reader;
		String line;
		int index;
		public FastScanner(InputStream in)
		{
			reader = new BufferedReader(new InputStreamReader(in));
		}
		public FastScanner(File f) throws FileNotFoundException
		{
			reader = new BufferedReader(new FileReader(f));
		}
		public String readLine()
		{
			try
			{
				String line = reader.readLine();
				if(line == null) throw new IOException("End of stream");
				return line;
			}
			catch(IOException exception)
			{
				throw new RuntimeException(exception);
			}
		}
		public String nextLine()
		{
			if(line==null) return readLine();
			String s = line;
			line = null;
			return s.substring(index);
		}
		public String next()
		{
			if(line == null)
			{
				line = readLine();
				index = 0;
			}
			while(index >= line.length())
			{
				line = readLine();
				index = 0;
			}
			while(Character.isWhitespace(line.charAt(index)))
			{
				index++;
				while(index >= line.length())
				{
					line = readLine();
					index = 0;
				}
			}
			int endIndex = index;
			while(endIndex < line.length() && !Character.isWhitespace(line.charAt(endIndex)))
				endIndex++;
			String s = line.substring(index, endIndex);
			index = endIndex;
			return s;
		}
		public int nextInt() { return Integer.parseInt(next()); }
		public long nextLong() { return Long.parseLong(next()); }
		public double nextDouble() { return Double.parseDouble(next()); }
		public void close() {;}
	}
}
