#include <bits/stdc++.h>
using namespace std;
vector<int> primes;
bool Mark[100005];
void seive() {
  memset(Mark, 1, sizeof Mark);
  for (long long i = 2; i < 100005; i++) {
    if (Mark[i]) {
      primes.push_back(i);
      for (long long j = i * i; j < 100005; j += i) Mark[j] = false;
    }
  }
  return;
}
long long dp[505][15005];
int n;
int solve(int index, int have) {
  if (index == n - 1) return 1;
  long long &ans = dp[index][have];
  if (ans != -1) return ans;
  ans = 0;
  if (have > 0) {
    ans = solve(index, have - 1);
  }
  ans = (ans + solve(index + 1, have)) % 1000000007;
  return ans;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  seive();
  map<int, int> freq;
  long long ans = 1;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    int a;
    cin >> a;
    for (auto &x : primes) {
      while (a % x == 0) {
        freq[x]++;
        a /= x;
      }
    }
    if (a != 1) freq[a]++;
  }
  memset(dp, -1, sizeof dp);
  for (auto &x : freq) {
    ans = (ans * solve(0, x.second)) % 1000000007;
  }
  cout << ans;
  return 0;
}
