#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const int N = 1e6 + 5;
long long fact[N];
map<int, int> freq;
void P_fact(long long n) {
  while (n % 2 == 0) {
    freq[2]++;
    n = n / 2;
  }
  for (int i = 3; i <= sqrt(n); i = i + 2) {
    while (n % i == 0) {
      freq[i]++;
      n = n / i;
    }
  }
  if (n > 2) freq[n]++;
}
int pw(int x, int y) {
  if (y == 0) return 1;
  long long temp = pw(x, y / 2);
  if (y & 1) return temp * temp % mod * x % mod;
  return temp * temp % mod;
}
int C(int n, int k) {
  return fact[n] * pw(fact[k] * fact[n - k] % mod, mod - 2) % mod;
}
int main() {
  fact[0] = 1;
  for (int i = 1; i < N; i++) fact[i] = fact[i - 1] * i, fact[i] %= mod;
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    int x;
    scanf("%d", &x);
    P_fact(x);
  }
  long long ans = 1;
  for (auto it : freq) {
    ans *= C(it.second + n - 1, n - 1);
    ans %= mod;
  }
  printf("%I64d", ans);
  return 0;
}
