#include <bits/stdc++.h>
using namespace std;
int n;
long long x;
long long fact[100005], inv_fact[100005];
map<long long, long long> memo;
void decomp(long long n) {
  long long i = 2;
  while (i * i <= n) {
    while (n % i == 0) {
      if (memo.find(i) == memo.end()) {
        memo[i] = 1;
      } else {
        ++memo[i];
      }
      n /= i;
    }
    ++i;
  }
  if (n != 1) {
    if (memo.find(n) == memo.end()) {
      memo[n] = 1;
    } else {
      ++memo[n];
    }
  }
}
long long my_pow(long long a, long long b) {
  long long ret = 1;
  while (b > 0) {
    if (b % 2 == 1) {
      ret = (ret * a) % 1000000007;
    }
    a = (a * a) % 1000000007;
    b /= 2;
  }
  return (ret);
}
long long inv(long long a) { return (my_pow(a, 1000000007 - 2)); }
long long sum(long long n) { return (n * (n - 1) / 2); }
long long comb(long long n, long long m) {
  long long ret = (fact[n] * inv_fact[m]) % 1000000007;
  ret = (ret * inv_fact[n - m] + 1000000007) % 1000000007;
  return (ret);
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    cin >> x;
    decomp(x);
  }
  if (n == 1) {
    printf("1\n");
    exit(0);
  }
  fact[0] = 1;
  inv_fact[0] = inv(fact[0]);
  for (int i = 1; i < 100005; ++i) {
    fact[i] = (i * fact[i - 1]) % 1000000007;
    inv_fact[i] = inv(fact[i]);
  }
  long long ans = 1;
  for (auto c : memo) {
    ans = (ans * comb(c.second + n - 1, n - 1)) % 1000000007;
  }
  cout << ans << "\n";
  return 0;
}
