#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int maxn = 2e4 + 5;
map<int, int> M;
int C[maxn][505];
inline void init() {
  C[0][0] = 1;
  for (int i = 1; i <= maxn - 5; i++) {
    for (int j = 0; j <= min(i, 500); j++) {
      if (j == 0 || j == i)
        C[i][j] = 1;
      else
        C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % mod;
    }
  }
}
int main() {
  init();
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    int tmp;
    scanf("%d", &tmp);
    for (int j = 2; j * j <= tmp; j++) {
      while (tmp % j == 0) {
        M[j]++;
        tmp /= j;
      }
    }
    if (tmp > 1) M[tmp]++;
  }
  long long ans = 1;
  for (auto it = M.begin(); it != M.end(); it++) {
    long long k = it->second;
    ans = (ans * C[k + n - 1][n - 1]) % mod;
  }
  printf("%lld\n", ans);
  return 0;
}
