#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const unsigned gen_seed =
    std::chrono::system_clock::now().time_since_epoch().count();
std::mt19937_64 gen(gen_seed);
int main() {
  vector<std::vector<long long> > cnk(20002, std::vector<long long>(501, 0));
  for (int i = 0; i < 20002; i++) cnk[i][0] = 1;
  for (int i = 1; i < 20002; i++) {
    for (int j = 1; j < min(i + 1, 501); j++) {
      cnk[i][j] = (cnk[i - 1][j] + cnk[i - 1][j - 1]) % mod;
    }
  }
  const int LIMIT = 40000;
  std::vector<bool> isp(LIMIT + 1, true);
  std::vector<int> mindiv(LIMIT + 1, 0);
  for (int i = 0; i < LIMIT + 1; i++) mindiv[i] = i;
  int upbound = (int)sqrt((double)LIMIT);
  std::vector<int> p;
  for (int m = 2; m <= upbound; m++) {
    if (isp[m]) {
      p.push_back(m);
      for (int k = m * m; k <= LIMIT; k += m) {
        isp[k] = false;
        mindiv[k] = min(mindiv[k], m);
      }
    }
  }
  for (int m = upbound + 1; m <= LIMIT; m++) {
    if (isp[m]) {
      p.push_back(m);
    }
  }
  map<int, int> d;
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    int x;
    scanf("%d", &x);
    for (auto pr : p) {
      while (x % pr == 0) {
        d[pr]++;
        x /= pr;
      }
    }
    if (x > 1) d[x]++;
  }
  long long ans = 1;
  for (auto x : d) {
    int l = x.second;
    ans = ans * cnk[l + n - 1][n - 1] % mod;
  }
  cout << ans;
}
