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.util.List;

public class Main {
    private static StringTokenizer st;
    private static BufferedReader br;
    public static long MOD = 1000000007;
    public static int billion = 1000000000;

    public static void print(Object x) {
        System.out.println(x + "");
    }
    public static void printArr(long[] x) {
        StringBuilder s = new StringBuilder();
        for (int i = 0; i < x.length; i++) {
            s.append(x[i] + " ");
        }
        print(s);
    }
    public static void printArr(int[] x) {
        StringBuilder s = new StringBuilder();
        for (int i = 0; i < x.length; i++) {
            s.append(x[i] + " ");
        }
        print(s);
    }
    public static String join(Collection<?> x, String space) {
        if (x.size() == 0) return "";
        StringBuilder sb = new StringBuilder();
        boolean first = true;
        for (Object elt : x) {
            if (first) first = false;
            else sb.append(space);
            sb.append(elt);
        }
        return sb.toString();
    }

    public static String nextToken() throws IOException {
        while (st == null || !st.hasMoreTokens()) {
            String line = br.readLine();
            st = new StringTokenizer(line.trim());
        }
        return st.nextToken();
    }
    public static int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }
    public static long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }
    public static List<Integer> nextInts(int N) throws IOException {
        List<Integer> ret = new ArrayList<Integer>();
        for (int i = 0; i < N; i++) {
            ret.add(nextInt());
        }
        return ret;
    }

    public static List<Integer> factorize(int n) {
        List<Integer> factors = new ArrayList<Integer>();
        for (int x = 2; x * x <= billion;) {
            if (n % x == 0) {
                n /= x;
                factors.add(x);
            } else x++;
        }
        if (n != 1) factors.add(n);
        return factors;
    }

    public static class Pair {
        long f;
        long s;
        public Pair(long f1, long s1) {
            f = f1;
            s = s1;
        }
    }
    public static Pair egcd(long x, long y) {
        if (x > y) {
            Pair p = egcd(y, x);
            return new Pair(p.s, p.f);
        }
        if (y == 1) return new Pair(0, 1);
        Pair p = egcd(x, y % x);
        long c = y / x;
        return new Pair(p.f - p.s * c, p.s);
    }
    public static long inverse(long x, long p) {
        Pair pair = egcd(x, p);
        return (pair.f + p * p) % p;
    }
    public static long modFactorial(int n) {
        long cur = 1;
        for (int i = 2; i <= n; i++) {
            cur = (cur * i) % MOD;
        }
        return cur;
    }
    public static long modChoose(int n, int k) {
        long ans = modFactorial(n);
        ans = (ans * inverse(modFactorial(k), MOD)) % MOD;
        ans *= inverse(modFactorial(n-k), MOD);
        //print(n + "c" + k + " = " + ans);
        return ans % MOD;
    }

    public static void main(String[] args) throws IOException {
        br = new BufferedReader(new InputStreamReader(System.in));

        int n = nextInt();
        Map<Integer, Integer> factorCount = new HashMap<Integer, Integer>();
        for (int i = 0; i < n; i++) {
            int x = nextInt();
            for (int factor : factorize(x)) {
                if (!factorCount.containsKey(factor)) factorCount.put(factor, 0);
                factorCount.put(factor, factorCount.get(factor) + 1);
            }
        }

        long ways = 1;
        for (Map.Entry<Integer, Integer> entry : factorCount.entrySet()) {
            int m = entry.getValue();
            //print(entry.getKey() + " multiplicity " + m);
            ways = (ways * modChoose(n+m-1, n-1)) % MOD;
        }
        print(ways);
    }
}
