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.Stack;
import java.util.regex.Pattern;






public class ROUGH {

	
	 
	
	public static class FastReader {
		BufferedReader br;
		StringTokenizer st;
		//it reads the data about the specified point and divide the data about it ,it is quite fast
		//than using direct 

		public FastReader() {
			br = new BufferedReader(new InputStreamReader(System.in));
		}

		String next() {
			while (st == null || !st.hasMoreTokens()) {
				try {
					st = new StringTokenizer(br.readLine());
				} catch (Exception r) {
					r.printStackTrace();
				}
			}
			return st.nextToken();
		}

		int nextInt() {
			return Integer.parseInt(next());//converts string to integer
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		String nextLine() {
			String str = "";
			try {
				str = br.readLine();
			} catch (Exception r) {
				r.printStackTrace();
			}
			return str;
		}
	}
	
	public static PrintWriter out = new PrintWriter (new BufferedOutputStream(System.out));
	static long mod = (long) (1e9+7);
	static int N = (int) 1e5;
	public static void main(String[] args) {
		 FastReader sc = new FastReader();
	//	Scanner sc = new Scanner(System.in);
	    int n = sc.nextInt();
	    int[] a = new int[n];
	    long[] fac = new long[N+1];
	    fac[0] = 1;
	    for(int i=1;i<fac.length;++i) {
	    	fac[i] = (i*fac[i-1])%mod;
	    }
	    Map<Integer,Integer> map = new HashMap<>();
	    for(int i=0;i<n;++i) {
	    	a[i] = sc.nextInt();
	    	factor(a[i],map);
	    }
	   
	    long ans = 1;
	    for(int key : map.keySet()) {
	    	int k = map.get(key);
	    	
	    	ans = ((ans%mod)*((fac[n+k-1]*pow(fac[n-1],mod-2)%mod)*pow(fac[k],mod-2)%mod))%mod;
	    }
	    out.println(ans);
	    
			 out.close();
		}
	private static long pow(long a, long b) {
		if(b == 0) return 1L;
		long power = pow(a,b/2)%mod;
		long ans = (power*power)%mod;
		if((b&1) == 1)
			ans = (a*ans)%mod;
		
		return ans;
	}
	private static void factor(int n, Map<Integer, Integer> map) {
		 while (n%2==0) { 
	            add(map,2);
	            n /= 2; 
	        } 
	  
	        for (int i = 3; i <= Math.sqrt(n); i+= 2) {
	            while (n%i == 0) { 
	                add(map,i);
	                n /= i; 
	            } 
	        } 
	        if (n > 2) 
	            add(map,n);
		
	}
	private static void add(Map<Integer, Integer> map, int i) {
		// TODO Auto-generated method stub
		if(map.containsKey(i)) map.put(i, map.get(i)+1);
		else map.put(i,1);
		
	}
		
	 
		
	}