#include <bits/stdc++.h>
using namespace std;
vector<long long> arr;
long long dp[600][600];
bool vis[600][600];
long long fact[(int)1e5], revFac[(int)1e5];
long long power(long long b, long long p) {
  if (p == 0) return 1;
  long long sq = power(b, p / 2);
  sq = sq * sq;
  sq %= 1000000007;
  if (p % 2 == 1) sq = sq * b;
  sq %= 1000000007;
  return sq;
}
long long combinations(int n, int k) {
  if (n == k || k == 0) return 1;
  return (fact[n] * revFac[n - k] % 1000000007 * revFac[k] % 1000000007) %
         1000000007;
}
int main(int argc, const char* argv[]) {
  vector<bool> isPrime((int)1e5 + 10, true);
  isPrime[0] = isPrime[1] = false;
  for (long long i = 2; i * i <= 1e9; ++i) {
    if (isPrime[i])
      for (long long j = i * i; j * j <= 1e9; j += i) isPrime[j] = false;
  }
  fact[0] = fact[1] = 1;
  for (int i = 1; i * i <= 1e9; ++i)
    fact[i] = (fact[i - 1] % 1000000007 * i % 1000000007),
    revFac[i] = power(fact[i], 1000000007 - 2);
  vector<int> primes;
  for (int i = 2; i <= (int)(int)1e5; i++)
    if (isPrime[i]) primes.push_back(i);
  int n;
  cin >> n;
  vector<int> factors(primes.size(), 0);
  for (int j = 1; j <= (int)n; j++) {
    int t;
    cin >> t;
    for (int i = 0; i <= (int)primes.size() - 1; i++) {
      while (t % primes[i] == 0) t /= primes[i], ++factors[i];
      if (1 == t) break;
    }
    if (t != 1) {
      factors.push_back(1);
      primes.push_back(t);
    }
  }
  long long ans = 1;
  for (int power : factors)
    if (power) {
      ans *= combinations(n + power - 1, power);
      ans %= 1000000007;
    }
  cout << ans << endl;
  return 0;
}
