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.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Map;
import java.util.StringTokenizer;

public class Main232A {

    private FastScanner in;
    private PrintWriter out;

    public void solve() throws IOException {
        int n = in.nextInt();
        int[] a = new int[n];
        for(int i = 0; i < n; i++) {
            a[i] = in.nextInt();
        }

        int[] prime = new int[100000];
        prime[0] = 2;
        prime[1] = 3;
        int countPrime = 2;
        while(prime[countPrime - 1] < 50000) {
            int t = prime[countPrime - 1] + 2;
            while(true) {
                int i = 0;
                while(i < countPrime && t % prime[i] != 0) {
                    i++;
                }
                if(i == countPrime) {
                    break;
                }
                t = t + 2;
            }
            prime[countPrime] = t;
            countPrime++;
        }

        Map<Integer, Integer> map = new HashMap<Integer, Integer>();
        for(int i = 0; i < n; i++) {
            int t = a[i];
            int div = 0;
            while(t > 1 && div < countPrime) {
                int c = 0;
                while(t % prime[div] == 0) {
                    t /= prime[div];
                    c++;
                }
                if(c > 0) {
                    Integer count = map.get(prime[div]);
                    if(count == null) {
                        count = 0;
                    }
                    count += c;
                    map.put(prime[div], count);
                }
                div++;
            }
            if(t != 1) {
                Integer count = map.get(t);
                if(count == null) {
                    count = 0;
                }
                count += 1;
                map.put(t, count);
            }
        }

        long res = 1;
        for(Integer i : map.values()) {
            res = res * NumberTheoryUtil.combinationsWithRepetition(i, n, 1000000007);
            res = res % 1000000007;
        }

        out.println(res);
    }

    public static class NumberTheoryUtil {

        public static int gcd(int a, int b) {
            if((a == 0 && b == 0) || a < 0 || b < 0) {
                throw new IllegalArgumentException();
            }
            if(a < b) {
                return gcd(b, a);
            }
            if(b == 0) {
                return a;
            }
            return gcd(b, a % b);
        }

        public static class GcdexResult {
            //ax + by = gcd

            public int gcd;
            public long x;
            public long y;

            public GcdexResult(int gcd, int x, int y) {
                this.gcd = gcd;
                this.x = x;
                this.y = y;
            }
        }

        @SuppressWarnings("SuspiciousNameCombination")
        public static GcdexResult gcdex(int a, int b) {
            if(a < b) {
                GcdexResult res = gcdex(b, a);
                long tx = res.x;
                res.x = res.y;
                res.y = tx;
                return res;
            }
            if(b == 0) {
                return new GcdexResult(a, 1, 0);
            }
            int r = a % b;
            int c = a / b;

            GcdexResult res = gcdex(b, r);
            long tx = res.x;
            res.x = res.y;
            res.y = tx - c * res.y;
            return res;
        }

        // -1 - no solution
        public static int reverseModule(int a, int m) {
            GcdexResult gcdexResult = gcdex(a, m);
            if(gcdexResult.gcd != 1) {
                return -1;
            }
            long x = gcdexResult.x;
            x = ((x % m) + m) % m;
            return (int) x;
        }

        //only if mod prime
        public static int getBinomialCoefficient(int k, int n, int mod) {
            if(n <= 0 || k < 0 || k > n) {
                throw new IllegalArgumentException();
            }
            long num = 1;
            long div = 1;
            for(int i = 1; i <= k; i++) {
                num *= n + 1 - i;
                num %= mod;
                div *= i;
                div %= mod;
            }
            div = NumberTheoryUtil.reverseModule((int) div, mod);
            num *= div;
            num %= mod;
            return (int) num;
        }

        public static int combinationsWithRepetition(int k, int n, int mod) {
            return getBinomialCoefficient(k, n + k - 1, mod);
        }
    }

    public void run() {
        try {
            in = new FastScanner(System.in);
            out = new PrintWriter(System.out);
            solve();
            out.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    class FastScanner {

        BufferedReader br;
        StringTokenizer st;

        FastScanner(InputStream is) {
            br = new BufferedReader(new InputStreamReader(is));
        }

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

        int nextInt() {
            return Integer.parseInt(next());
        }

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

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

    public static void main(String[] arg) {
        new Main232A().run();
    }
}