#include <bits/stdc++.h>
using namespace std;
const int inf = 987654321;
const long long int INF = 123456789987654321;
const long long int mod = 1000000007;
const int MN = 500002;
vector<int> P, chk;
void get_P() {
  chk = vector<int>(MN, 0);
  for (int i = 2; i < MN; i++) {
    if (chk[i]) continue;
    P.push_back(i);
    int mul = 1;
    while (i * mul < MN) {
      if (!chk[i * mul]) chk[i * mul] = i;
      mul++;
    }
  }
}
int N;
vector<int> arr;
vector<int> X, prime;
map<int, int> dx;
void decompose() {
  for (int i = 0; i < N; i++) {
    for (int j = 0; j < P.size(); j++) {
      if (arr[i] % P[j] == 0) {
        while (arr[i] % P[j] == 0) {
          X.push_back(P[j]);
          prime.push_back(P[j]);
          arr[i] /= P[j];
        }
      }
    }
    if (arr[i] != 1) {
      X.push_back(arr[i]);
      prime.push_back(arr[i]);
    }
  }
}
void compress() {
  sort(X.begin(), X.end());
  X.resize(unique(X.begin(), X.end()) - X.begin());
  for (int i = 0; i < X.size(); i++) dx[X[i]] = i;
}
vector<int> cnt;
void counting() {
  cnt = vector<int>(X.size(), 0);
  for (int i = 0; i < prime.size(); i++) {
    cnt[dx[prime[i]]]++;
  }
}
long long int pw(long long int x, long long int n) {
  if (n == 0) return 1;
  long long int t = pw(x, n / 2);
  if (n % 2)
    return (t * t % mod) * x % mod;
  else
    return t * t % mod;
}
long long int mod_inv(long long int x) { return pw(x, mod - 2); }
vector<long long int> fact, inv_fact;
void get_fact() {
  fact.resize(MN);
  inv_fact.resize(MN);
  fact[0] = 1;
  inv_fact[0] = 1;
  for (int i = 1; i < MN; i++) {
    fact[i] = fact[i - 1] * (long long int)i % mod;
    inv_fact[i] = mod_inv(fact[i]);
  }
}
long long int comb(int n, int r) {
  return (fact[n] * inv_fact[r] % mod) * inv_fact[n - r] % mod;
}
long long int ans = 1;
void solve() {
  for (int i = 0; i < X.size(); i++) {
    ans *= comb(N + cnt[i] - 1, N - 1);
    ans %= mod;
  }
  printf("%I64d", ans);
}
int main() {
  get_P();
  get_fact();
  scanf("%d", &N);
  arr.resize(N);
  for (int i = 0; i < N; i++) {
    scanf("%d", &arr[i]);
  }
  decompose();
  compress();
  counting();
  solve();
}
