#include <bits/stdc++.h>
using namespace std;
const int MAXN = 16500, MAXP = 35000, mod = (int)1E9 + 7;
int v[MAXP], primo[MAXP], cont;
long long int inverso;
bool mrk[MAXP];
map<int, int> mp;
void fatora(int N) {
  int aa = __builtin_ctz(N);
  N /= (1 << aa);
  v[0] += aa;
  for (int i = 1; primo[i] * primo[i] <= N; i++) {
    while (N % primo[i] == 0) {
      N /= primo[i];
      v[i]++;
    }
  }
  if (N > 1) {
    if (mp.find(N) == mp.end()) mp[N] = ++cont;
    v[mp[N]]++;
  }
}
void calculaprimos() {
  mrk[1] = false;
  for (int i = 2; i < MAXP; i++) mrk[i] = true;
  for (int i = 2; i < MAXP; i++) {
    if (mrk[i]) {
      for (int k = i * i; k < MAXP; k += i) mrk[k] = false;
    }
  }
  cont = -1;
  for (int i = 2; i < MAXP; i++) {
    if (mrk[i]) {
      primo[++cont] = i;
      mp[i] = cont;
    }
  }
  for (int i = 0; i <= cont; i++) v[i] = 0;
}
void calculainverso(int N) {
  long long int x = 1LL;
  for (int i = 1; i <= N; i++) {
    x *= i;
    x %= mod;
  }
  inverso = 1LL;
  for (int i = 30; i >= 0; i--) {
    inverso *= inverso;
    inverso %= mod;
    if ((mod - 2) & (1 << i)) {
      inverso *= x;
      inverso %= mod;
    }
  }
}
long long int prod(int a, int b) {
  if (a == 0 || b == 0) return 1LL;
  long long int resp = 1LL;
  for (int i = a; i > a - b; i--) {
    resp *= i;
    resp %= mod;
  }
  return resp;
}
int main() {
  mp.clear();
  calculaprimos();
  int N, a;
  long long int resp = 1LL;
  scanf("%d", &N);
  calculainverso(N - 1);
  for (int i = 1; i <= N; i++) {
    scanf("%d", &a);
    fatora(a);
  }
  for (int i = 0; i <= cont; i++) {
    if (v[i] > 0) {
      resp *= prod(v[i] + N - 1, N - 1);
      resp %= mod;
      resp *= inverso;
      resp %= mod;
    }
  }
  if (N == 1)
    printf("1\n");
  else
    printf("%I64d\n", resp);
  return 0;
}
