#include <bits/stdc++.h>
using namespace std;
clock_t time_p = clock();
void time() {
  time_p = clock() - time_p;
  cerr << "Time elapsed : " << (double)(time_p) / CLOCKS_PER_SEC << '\n';
}
const long long MAXN = 2e5;
long long fact[MAXN + 2];
long long inv_fact[MAXN + 2];
const long long mod = 1e9 + 7;
long long power(long long x, long long y, long long p) {
  long long res = 1;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y >>= 1;
    x = (x * x) % p;
  }
  return res;
}
long long multiply(long long a, long long b) {
  a %= mod;
  b %= mod;
  return (a * b) % mod;
}
void pre() {
  fact[0] = 1;
  inv_fact[0] = 1;
  for (long long i = 1; i <= MAXN; i++) {
    fact[i] = (i * fact[i - 1]) % mod;
    inv_fact[i] = power(fact[i], mod - 2, mod);
  }
}
long long C(long long n, long long r) {
  if (r > n) return 0;
  long long res = fact[n];
  res = multiply(res, inv_fact[r]);
  res = multiply(res, inv_fact[n - r]);
  return res;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  pre();
  map<long long, long long> f;
  long long n;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    long long x;
    cin >> x;
    for (long long j = 2; j * j <= x; j++)
      if (x % j == 0) {
        while (x % j == 0) {
          f[j]++;
          x /= j;
        }
      }
    if (x >= 2) f[x]++;
  }
  long long res = 1;
  for (auto &x : f) res = multiply(res, C(x.second + n - 1, x.second));
  cout << res << '\n';
  time();
  return 0;
}
