#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f, maxn = 505;
int inv[maxn], n;
map<int, int> M;
map<int, int>::iterator it;
void init(int n = 500) {
  inv[1] = 1;
  for (int i = 2; i <= n; i++)
    inv[i] = 1000000007 -
             (long long)(1000000007 / i) * inv[1000000007 % i] % 1000000007;
}
int C(int n, int m) {
  int ans = 1;
  for (int i = 1; i <= m; i++)
    ans = (long long)ans * (n - m + i) % 1000000007 * inv[i] % 1000000007;
  return ans;
}
void Solve(int x) {
  for (int i = 2; i * i <= x; i++)
    while (x % i == 0) x /= i, M[i]++;
  if (x > 1) M[x]++;
}
int main() {
  init();
  while (~scanf("%d", &n)) {
    M.clear();
    for (int i = 1; i <= n; i++) {
      int a;
      scanf("%d", &a);
      Solve(a);
    }
    int ans = 1;
    for (it = M.begin(); it != M.end(); it++)
      ans = (long long)ans * C(n + it->second - 1, n - 1) % 1000000007;
    printf("%d\n", ans);
  }
  return 0;
}
