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.ArrayList;
import java.util.HashMap;
import java.util.StringTokenizer;

public class multipliers {
    static public HashMap<Integer,Integer> factor(int in){
        HashMap<Integer,Integer> result = new HashMap<>();
        for(int i=2;i*i<=in;i++){
            if(in%i==0){
                int count=0;
                while(in%i==0){
                    count++;
                    in/=i;
                }
                result.put(i,count);
            }
        }
        if(in!=1){
            result.put(in,1);
        }
        return result;
    }

    static public void factor(int in, HashMap<Integer,Integer> a){
        HashMap<Integer,Integer> result = new HashMap<>();
        for(int i=2;i*i<=in;i++){
            if(in%i==0){
                int count=0;
                while(in%i==0){
                    count++;
                    in/=i;
                }
                if(a.containsKey(i))
                    a.put(i,a.remove(i)+count);
                else
                    a.put(i,count);
            }
        }
        if(in!=1){
            if(a.containsKey(in))
                a.put(in,a.remove(in)+1);
            else
                a.put(in,1);

        }

    }
static int base=0;
    static int MOD= (int) (1e9+7);
//    static int[][] dp = new int[2000][2000];
    static public long choose(int n, int r){
//        if(n<0||r<0)
//            return 0;
//        if (n == r)
//                return 1;
//            if (r == 0)
//                return 1;
//            if (dp[n][r] != 0)
//                return dp[n][r];
//
//            return dp[n][r] = (choose(n - 1, r - 1) + choose(n - 1, r)) % MOD;
        int count = r;
        int cur = n;
        long ans = 1;
        while(count>0){
            ans*= cur;
            ans%=MOD;
            cur--;
            count--;
        }
        for(int i=2;i<=r;i++){
            ans*=BigInteger.valueOf(i).modInverse(BigInteger.valueOf(MOD)).longValueExact();
            ans%=MOD;
        }
//        System.out.print("FInished");
        return ans;
    }
    public static void main(String[] args) throws IOException {


        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int size = Integer.parseInt(br.readLine());
        int[] in = new int[size];
        StringTokenizer tokenizer = new StringTokenizer(br.readLine());
        for(int i=0;i<size;i++){
            in[i]=Integer.parseInt(tokenizer.nextToken());
        }
        HashMap<Integer,Integer> allFactors = factor(in[0]);

        for(int i=1;i<size;i++)
            factor(in[i],allFactors);
//        System.out.println(allFactors);
        int[] exp = new int[allFactors.size()];
        int index=0;
        int maxVal=0;
        for(int val:allFactors.values()){
            exp[index]=val;
            index++;
            maxVal=Math.max(maxVal,val);
        }
        int buckets= size;
        long product=1;
        for(int e:exp){
            product*=choose(buckets+e-1,buckets-1);
            product%=MOD;
        }
        System.out.println(product);

//        ArrayList<Integer> primes = new ArrayList<>();


    }
}
