#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long INF = 4e18;
const int inf = 2e9;
const double eps = 1e-13;
const int N = 1e9 + 5;
const int sz = 20000;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int lcm(int a, int b) { return a / gcd(a, b) * b; }
long long fact[sz], ifact[sz];
vector<int> prime;
vector<int> cur;
bitset<N> is;
long long power(long long a, long long b) {
  if (b == 0) return 1;
  long long temp = power(a, b / 2);
  temp *= temp;
  temp %= mod;
  if (b & 1) {
    temp *= a;
    temp %= mod;
  }
  return temp;
}
long long inv(long long a) { return power(a, mod - 2); }
long long c(long long n, long long k) {
  if (n < 0 || k < 0 || n < k) return 0;
  long long temp = fact[n] * ifact[k];
  temp %= mod;
  temp *= ifact[n - k];
  temp %= mod;
  return temp;
}
void insert(int a, int i) {
  if (i >= prime.size()) return;
  while (a % prime[i] == 0) {
    a /= prime[i];
    cur[i]++;
  }
  insert(a, i + 1);
}
void push(int a) {
  int i;
  for (i = 0; i < prime.size(); ++i) {
    while (a % prime[i] == 0) a /= prime[i];
  }
  if (a > 1) prime.push_back(a);
}
int a[555];
int main(void) {
  int n;
  long long i, j;
  fact[0] = ifact[0] = 1;
  for (i = 1; i <= sz - 1; ++i) {
    fact[i] = fact[i - 1] * i;
    fact[i] %= mod;
    ifact[i] = inv(fact[i]);
  }
  prime.push_back(2);
  for (i = 2; i * i < N; i += (i == 2 ? 1 : 2)) {
    if (!is[i]) {
      prime.push_back(i);
      for (j = (long long)i * i; (long long)j * j < N; j += i) {
        is[j] = 1;
      }
    }
  }
  scanf("%d", &n);
  for (i = 0; i < n; ++i) {
    scanf("%d", &a[i]);
    push(a[i]);
  }
  sort(prime.begin(), prime.end());
  prime.resize(distance(prime.begin(), unique(prime.begin(), prime.end())));
  cur.resize(prime.size(), 0);
  for (i = 0; i < n; ++i) insert(a[i], 0);
  long long ans = 1;
  for (i = 0; i < prime.size(); ++i) {
    ans *= c(cur[i] + n - 1, cur[i]);
    ans %= mod;
  }
  cout << ans << endl;
  return 0;
}
