You are given an integer m as a product of integers a1, a2, … an . 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

Copy

output

input

Copy

output

input

Copy

output

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 . Two decompositions b and c are considered different, if there exists index i such that bi ≠ ci.

考虑把每个a分解质因数 统计每种质因数的个数 那么如果直接考虑会有重复的 不妨我们考虑把这些质因数如何放入我的位置即可吧 那么相当于每种质数我考虑放入n个位置的方案数吧利用隔板法 因为每个位置不必有 那么加设第i种质数有k个 那么相当于在k+n-1个空位里插入n-1个板的方案数

\[ans=\prod_{i=1}^t C(n+k_i-1,n-1)\]

 

分类: 数学

elijahqi

辣鸡蒟蒻一枚qwq 欢迎加qq qwq 2922945330

发表评论