#include <bits/stdc++.h>
using namespace std;
const int N = 2222 * 40 + 5;
const int INF = 1e9 + 7;
int a[1555];
long long fact[N], inv[N];
long long pw(long long x, long long exp1) {
  if (exp1 == 0) return 1;
  long long y = pw(x, exp1 / 2);
  y = (y * y) % 1000000007;
  if (exp1 & 1) y = (y * x) % 1000000007;
  return y;
}
void pre() {
  fact[0] = 1;
  inv[0] = 1;
  for (int i = (1); i < (N); i++) fact[i] = (fact[i - 1] * i) % 1000000007;
  for (int i = (1); i < (N); i++) inv[i] = pw(fact[i], 1000000007 - 2);
  return;
}
long long ncr(int n, int r) {
  if (n < r) return 0;
  if (n == r) return 1;
  long long tmp = fact[n];
  tmp = (tmp * inv[r]) % 1000000007;
  tmp = (tmp * inv[n - r]) % 1000000007;
  return tmp;
}
long long begger(int n, int r) {
  long long res = ncr(n + r - 1, r - 1);
  return res;
}
int p[333333];
vector<int> prime;
void sieve() {
  for (int i = 2; i < 333333; i++) {
    if (p[i]) continue;
    prime.push_back(i);
    for (int j = 2 * i; j < 333333; j += i) {
      p[j] = 1;
    }
  }
  return;
}
map<int, int> cntp;
int main() {
  pre();
  int n;
  scanf("%d", &n);
  for (int i = (0); i < (n); i++) {
    scanf("%d", &a[i]);
  }
  sieve();
  for (int i = (0); i < (n); i++) {
    long long x = a[i];
    for (int j = (0); j < (prime.size()); j++) {
      long long y = prime[j];
      if (y * y > x) break;
      int cnt = 0;
      while (x % y == 0) {
        x /= y;
        cnt++;
      }
      if (cnt > 0) cntp[y] += cnt;
    }
    if (x > 1) cntp[x]++;
  }
  long long ans = 1;
  for (map<int, int>::iterator it = cntp.begin(); it != cntp.end(); it++) {
    ans = (ans * begger(it->second, n)) % 1000000007;
  }
  cout << ans;
  return 0;
}
