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.
#include <bits/stdc++.h>
using namespace std;
template <typename T, typename U>
T pow_mod(T a, U b, int mod) {
  T r = 1;
  for (; b > 0; b >>= 1) {
    if (b & 1) r = (long long)r * a % mod;
    a = (long long)a * a % mod;
  }
  return r;
}
const int mod = 1e9 + 7, N = 31 * 500;
int fac[N], ifac[N];
void init() {
  fac[0] = ifac[0] = 1;
  for (int i = 1; i < N; ++i) {
    fac[i] = (long long)fac[i - 1] * i % mod;
    ifac[i] = pow_mod(fac[i], mod - 2, mod);
  }
}
int comb(int n, int k) {
  return (long long)fac[n] * ifac[n - k] % mod * ifac[k] % mod;
}
int starsandbars(int n, int k) { return comb(n + k - 1, k - 1); }
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  int n;
  cin >> n;
  map<int, int> mp;
  for (int i = 0, x; i < n; ++i) {
    cin >> x;
    for (int j = 2; j * j <= x; ++j)
      if (x % j == 0) {
        int c = 0;
        while (x % j == 0) x /= j, ++c;
        mp[j] += c;
      }
    if (x > 1) ++mp[x];
  }
  init();
  int ans = 1;
  for (auto i : mp) ans = (long long)ans * starsandbars(i.second, n) % mod;
  cout << ans << "\n";
  return 0;
}
