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

n = int(input())
mod = 1000000007
a = list(map(int, input().split()))
sl = [0] * 40005
gt = [1] * 100005
res = 1


def chia(cs, mu):
    if mu == 1:
        return cs % mod
    ans = chia(cs, mu // 2)
    ans = (ans * ans) % mod
    if mu % 2 == 0:
        return ans
    return (ans * cs) % mod


def choose(po, qo):
    global gt, mod
    # print(po, qo, qo-po)
    chia_1 = chia(gt[po], mod - 2)
    chia_2 = chia(gt[qo - po], mod - 2)
    return (((chia_1 * chia_2) % mod) * gt[qo]) % mod


for x in a:
    dem = 2
    while x > 1:
        while x % dem != 0:
            dem += 1
        while x % dem == 0 and x > 1:
            x /= dem
            sl[dem] += 1

for x in range(2, 100005):
    gt[x] = (gt[x - 1] * x) % mod

for x in range(2, 40001):
    if sl[x] == 0:
        continue
    res = (res * choose(n - 1, sl[x] + n - 1)) % mod

print(res)
