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

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Aldo Culquicondor
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        private HashMap<Integer, Integer> factors;
        private int[] inv;
        private static int mod = 1000000007;
        private static int maxK = 500;

        private void add(int f, int v) {
            factors.put(f, factors.containsKey(f) ? factors.get(f) + v : v);
        }

        private void factorize(int x) {
            for (int i = 2; i * i <= x; ++i) {
                int cnt = 0;
                while (x % i == 0) {
                    ++cnt;
                    x /= i;
                }
                if (cnt > 0)
                    add(i, cnt);
            }
            if (x > 1)
                add(x, 1);
        }

        private int comb(int n, int k) {
            long ans = 1;
            for (int i = 0; i < k; ++i)
                ans = NumberTheory.mod(NumberTheory.mod(ans * (n - i), mod) * inv[i + 1], mod);
            return (int) ans;
        }

        public void solve(int testNumber, InputReader in, PrintWriter out) {
            factors = new HashMap<>();
            inv = new int[maxK];
            for (int i = 0; i < maxK; ++i)
                inv[i] = (int) NumberTheory.expMod(i, mod - 2, mod);

            int n = in.nextInt();
            for (int i = 0; i < n; ++i)
                factorize(in.nextInt());
            long ans = 1;
            for (int exp : factors.values())
                ans = (ans * comb(exp + n - 1, n - 1)) % mod;
            out.println(ans);
        }

    }

    static class NumberTheory {
        public static long mod(long x, long mod) {
            return x >= mod || x <= -mod ? x % mod : x;
        }

        public static long expMod(long a, long e, long mod) {
            long r = 1;
            while (e > 0) {
                if ((e & 1) != 0)
                    r = mod(a * r, mod);
                e >>= 1;
                a = mod(a * a, mod);
            }
            return r < 0 ? r + mod : r;
        }

    }

    static class InputReader {
        private BufferedReader reader;
        private StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 65536);
            tokenizer = null;
        }

        public String next() {
            String line;
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    line = reader.readLine();
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
                if (line == null)
                    throw new UnknownError();
                tokenizer = new StringTokenizer(line);
            }
            return tokenizer.nextToken();
        }

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

    }
}

