You are given an integer *m* as a product of integers *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ... *a*<sub class="lower-index">*n*</sub> <img align="middle" class="tex-formula" src="https://espresso.codeforces.com/cf060eec22f7a6ddd13992efe2ebf6d08fde945a.png" style="max-width: 100.0%;max-height: 100.0%;"/>. 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 (10<sup class="upper-index">9</sup> + 7).
The first line contains positive integer *n* (1 ≤ *n* ≤ 500). The second line contains space-separated integers *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*n*</sub> (1 ≤ *a*<sub class="lower-index">*i*</sub> ≤ 10<sup class="upper-index">9</sup>).
# Design_by_JOKER
import math
import cmath

Mod = 1000000007

MAX = 33000

n = int(input())

A = list(map(int, input().split()))

B = [0] * MAX

bePrime = [0] * MAX;

primNum = []

C = []

fac = [1]

for j in range(1, MAX):
    fac.append(fac[-1] * j % Mod)


def calc(M, N):
    return fac[M] * pow(fac[N] * fac[M - N] % Mod, Mod - 2, Mod) % Mod


for j in range(2, MAX):

    if bePrime[j] == 0:

        primNum.append(j)

        i = j

        while i < MAX:
            bePrime[i] = 1

            i = i + j

for x in A:

    tmp = x

    for j in primNum:

        while tmp % j == 0:
            tmp /= j

            B[j] += 1

    if tmp > 1:
        C.append(tmp)

ans = 1

for j in range(2, MAX):

    if B[j] > 0:
        ans = ans * calc(n + B[j] - 1, n - 1) % Mod

l = len(C)

for j in range(0, l):

    num = 0;

    for k in range(0, l):

        if C[k] == C[j]:

            num = num + 1

            if k > j:
                num = 0

                break

    if num > 0:
        ans = ans * calc(n + num - 1, n - 1) % Mod

print(str(ans % Mod))
