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.
//package codeforces;

import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.*;


public class OnNumberofDecompositionsintoMultipliers { 
    private static long[] prodCache;
    private static long m = 1000000007;
    
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        
        int n = in.nextInt();
        if (n == 1) {
            out.println(1);
            out.flush();
            return;
        }
        
        int[] a = new int[n];
        for (int i = 0; i < n; i++)
            a[i] = in.nextInt();
        
        long start = System.currentTimeMillis();
        
        Map<Integer, Integer> divs = new HashMap<>();
        for (int i = 0; i < a.length; i++) {
            for (int j : getDivs(a[i])) {
                if (divs.containsKey(j)) {
                    divs.put(j, divs.get(j)+1);
                }
                else {
                    divs.put(j, 1);
                }
            }
        }
        
        
        long prod = 1;
        int maxVal = getMax(divs.values());
        prodCache = new long[n + maxVal];
        prodCache[0] = prodCache[1] = 1;
        for (int i = 2; i < n+maxVal; i++) {
            prodCache[i] = prodCache[i-1] * i % m;            
        }
        
        for (int i : divs.values()) {                        
            prod *= comb(n+i-1, n-1);
            prod %= m;
        }
            
        //System.out.println("total = " + (System.currentTimeMillis()-start));
        
        out.println(prod);
        out.flush();
        
        
    }    
    
    private static List<Integer> getDivs(int num) {
        List<Integer> divs = new ArrayList<>(30);
        while(num > 1) {
            boolean found = false;
            int max = (int)Math.ceil(Math.sqrt(num));            
            for (int div = 2; div <= max; div++)
                if (num % div == 0) {
                    num /= div;
                    divs.add(div);
                    found = true;
                    break;
                }
            
            if(!found) {
                divs.add(num);
                break;
            }
        }
             
        return divs;
    }
   
    private static long inverse(long n) {
        BigInteger bi = new BigInteger(String.valueOf(n));
        return Long.parseLong(bi.modInverse(new BigInteger(String.valueOf(m))).toString());
    }
    
    private static long comb(int n, int k) {
        if (k == 0 || k == n) return 1;
        long denom = prodCache[k] * prodCache[n-k] % m;
        return prodCache[n] * inverse(denom) % m;
    }
    
    
    private static int getMax(Collection<Integer> col) {
        int max = 0;
        for (int i : col)
            max = Math.max(i, max);
        return max;
    }
}
