#include <bits/stdc++.h>
const long long mod = 1000000007;
using namespace std;
map<int, int> gg;
long long c[21111][1111];
void init(void) {
  c[0][0] = 1;
  for (int i = 1; i < 21111; i++)
    for (int j = 0; j <= i && j < 1111; j++) {
      if (j == 0 || j == i)
        c[i][j] = 1;
      else
        c[i][j] = (c[i - 1][j - 1] + c[i - 1][j]) % mod;
    }
}
void sov(long long x) {
  for (int j = 2; j * j <= x; j++)
    if (x % j == 0) {
      int tt = 0;
      while (x % j == 0) {
        tt++;
        x /= j;
      }
      gg[j] += tt;
    }
  if (x != 1) {
    gg[x] += 1;
  }
}
int main() {
  int n;
  long long xx;
  init();
  while (scanf("%d", &n) != EOF) {
    gg.clear();
    for (int i = 1; i <= n; i++) {
      scanf("%I64d", &xx);
      sov(xx);
    }
    long long ans = 1;
    for (map<int, int>::iterator it = gg.begin(); it != gg.end(); it++) {
      int tt = (*it).second;
      ans = (ans * c[tt + n - 1][n - 1]) % mod;
    }
    printf("%I64d\n", ans);
  }
  return 0;
}
