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.math.*;


public class onnumberofdecompositionmultipliers {
	public static void main(String[] args) throws Exception
	{
		InputReader in=new InputReader(System.in);
		PrintWriter pw=new PrintWriter(System.out);
		int n=in.nextInt();
		int[] a=new int[n];
		for(int i=0;i<n;i++)
		{
			a[i]=in.nextInt();
		}
		HashMap<Integer,Integer> hm=new HashMap<Integer,Integer>();
		for(int i=0;i<n;i++)
		{
			int t=a[i];
			for(int j=2;j<=Math.sqrt(a[i]);j++)
			{
				while(t%j==0)
				{
					t=t/j;
					if(hm.containsKey(j))
					{
						int cc=hm.get(j);
						hm.put(j, cc+1);
					}
					else
					{
						hm.put(j,1);
					}
				}
			}
			//System.out.println("t is "+t);
			if(t>=2)
			{
				if(hm.containsKey(t))
				{
					int cc=hm.get(t);
					//System.out.println("cc is "+cc);
					hm.put((int)t, cc+1);
				}
				else
				{
					hm.put((int)t, 1);
				}
					
			}
		}
		long ans=1;
		int mod=(int)(1e9+7);
		for(int k:hm.keySet())
		{
			//System.out.println(" k is "+k+" l is "+hm.get(k));
			ans*=binomial(n+hm.get(k)-1,n-1,mod);
			ans%=mod;
		}
		pw.println(ans);
		
		
		pw.close();
	}
	public static long[][] binomialTable(int n) {
	    long[][] c = new long[n + 1][n + 1];
	    for (int i = 0; i <= n; i++)
	      for (int j = 0; j <= i; j++)
	        c[i][j] = (j == 0) ? 1 : c[i - 1][j - 1] + c[i - 1][j];
	    return c;
	  }

	  public static long binomial(long n, long m) {
	    m = Math.min(m, n - m);
	    long res = 1;
	    for (long i = 0; i < m; i++) {
	      res = res * (n - i) / (i + 1);
	    }
	    return res;
	  }

	  // n! % mod
	  public static int factorial(int n, int mod) {
	    long res = 1;
	    for (int i = 2; i <= n; i++)
	      res = res * i % mod;
	    return (int) (res % mod);
	  }

	  // n! mod p, p - prime, O(p*log(n)) complexity
	  public static int factorial2(int n, int p) {
	    int res = 1;
	    while (n > 1) {
	      res = (res * ((n / p) % 2 == 1 ? p - 1 : 1)) % p;
	      for (int i = 2; i <= n % p; ++i)
	        res = (res * i) % p;
	      n /= p;
	    }
	    return res % p;
	  }

	  public static int binomial(int n, int m, int mod) {
	    m = Math.min(m, n - m);
	    long res = 1;
	    for (int i = n - m + 1; i <= n; i++)
	      res = res * i % mod;
	    return (int) (res * BigInteger.valueOf(factorial(m, mod)).modInverse(BigInteger.valueOf(mod)).intValue() % mod);
	  }
	
	
	
	
	
	
	
	 static class InputReader {

		private InputStream stream;
		private byte[] buf = new byte[8192];
		private int curChar;
		private int snumChars;
		private SpaceCharFilter filter;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		public int snext() {
			if (snumChars == -1)
				throw new InputMismatchException();
			if (curChar >= snumChars) {
				curChar = 0;
				try {
					snumChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (snumChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public int nextInt() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}

			int res = 0;

			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));

			return res * sgn;
		}
		
		public long nextLong() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}

			long res = 0;

			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));

			return res * sgn;
		}
		
		public String readString() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public boolean isSpaceChar(int c) {
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		public interface SpaceCharFilter {
			public boolean isSpaceChar(int ch);
		}
	}


}
