#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e14 + 9;
int facts[200009];
long long mult(long long a, long long b) { return a * b % 1000000007; }
long long fastpow(long long a, long long b) {
  long long calc = 1;
  for (; b >= 1LL; b /= 2LL) {
    if ((b & 1LL)) calc = mult(calc, a);
    a = mult(a, a);
  }
  return calc;
}
long long soma(long long a, long long b) {
  if (a + b >= 1000000007)
    return a + b - 1000000007;
  else
    return a + b;
}
long long subt(long long a, long long b) {
  if (a - b < 0)
    return a - b + 1000000007;
  else
    return a - b;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  facts[0] = 1;
  for (long long i = 1; i < (200009); ++i) {
    facts[i] = mult(facts[i - 1], i);
  }
  long long n;
  cin >> n;
  int prims = 0;
  map<int, int> cont;
  for (long long i = 0; i < (n); ++i) {
    long long a;
    cin >> a;
    for (long long j = 2; j < (sqrt(a) + 1); ++j) {
      if (a % j == 0) {
        while (a % j == 0) {
          cont[j]++;
          a /= j;
        }
      }
    }
    if (a != 1) cont[a]++;
  }
  long long ans = 1;
  for (auto e : cont) {
    ans = mult(ans, mult(facts[n - 1 + e.second],
                         fastpow(mult(facts[n - 1], facts[e.second]),
                                 1000000007 - 2)));
  }
  cout << ans << '\n';
  return 0;
}
