#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 5;
long long fact[N];
class COnNumberOfDecompositionsIntoMultipliers {
 public:
  map<long long, long long> Map;
  void factorize(long long n) {
    while (n % 2 == 0) Map[2]++, n /= 2;
    for (long long i = 3; i * i <= n; i += 2) {
      while (n % i == 0) Map[i]++, n /= i;
    }
    if (n > 2) Map[n]++;
  }
  const long long MOD = 1e9 + 7;
  inline long long mul(long long x, long long y) { return (x * y) % MOD; }
  long long powermod(long long x, long long y) {
    long long res = 1;
    while (y) {
      if (y & 1) res = mul(res, x);
      y >>= 1;
      x = mul(x, x);
    }
    return res;
  }
  long long inv(long long n) { return powermod(n, MOD - 2); }
  long long nCr(long long n, long long r) {
    return mul(fact[n], mul(inv(fact[r]), inv(fact[n - r])));
  }
  void solve(std::istream& in, std::ostream& out) {
    long long n;
    in >> n;
    fact[0] = 1;
    for (long long i = 1; i <= N - 1; i++) fact[i] = mul(fact[i - 1], i);
    for (long long i = 0; i < n; i++) {
      long long x;
      in >> x;
      factorize(x);
    }
    long long res = 1;
    for (auto w : Map) {
      long long p = w.first;
      long long e = w.second;
      res = mul(res, nCr(n + e - 1, n - 1));
    }
    out << res;
  }
};
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  COnNumberOfDecompositionsIntoMultipliers solver;
  std::istream& in(std::cin);
  std::ostream& out(std::cout);
  solver.solve(in, out);
  return 0;
}
