#include <bits/stdc++.h>
using namespace std;
const int p = 1000000007;
int fast_exp(int n, int exp) {
  auto result = 1;
  while (exp != 0) {
    if (exp % 2 == 1) result = 1LL * result * n % p;
    exp /= 2;
    n = 1LL * n * n % p;
  }
  return result;
}
int inverse(const int n) { return fast_exp(n, p - 2); }
int binomial(const int n, const int k, const int factorial) {
  auto result = factorial;
  for (auto i = 1; i <= k; i++) result = 1LL * result * (n - i + 1) % p;
  return result;
}
int main() {
  ios_base::sync_with_stdio(false);
  short n;
  cin >> n;
  int a[n], result = 1;
  for (auto i = 0; cin >> a[i]; i++)
    ;
  map<int, int> count;
  for (auto current : a) {
    for (auto i = 2; current != 1 && i <= current / i; i++)
      while (current % i == 0) {
        count[i] = (count[i] + 1) % p;
        current /= i;
      }
    if (current != 1) {
      count[current] = (count[current] + 1) % p;
      current = 1;
    }
  }
  auto factorial = 1;
  for (auto i = 2; i < n; i++) factorial = 1LL * factorial * i % p;
  factorial = inverse(factorial);
  for (auto i : count)
    result =
        (1LL * result * binomial((n + i.second - 1) % p, n - 1, factorial)) % p;
  cout << result;
  return 0;
}
