#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
long long C[16666][555];
map<int, int> m;
long long ans = 1;
int main() {
  int n;
  cin >> n;
  C[0][0] = 1;
  for (int i = 0; i < (16666 - 2); i++)
    for (int j = 0; j < (min(i + 1, 501)); j++) {
      C[i + 1][j] = (C[i + 1][j] + C[i][j]) % mod;
      C[i + 1][j + 1] = (C[i + 1][j + 1] + C[i][j]) % mod;
    }
  for (int i = 0; i < (n); i++) {
    int x;
    cin >> x;
    for (int i = 2; i * i <= x; i++)
      while (!(x % i)) x /= i, m[i]++;
    if (x != 1) m[x]++;
  }
  for (map<int, int>::iterator it = m.begin(); it != m.end(); it++)
    ans = (ans * C[n + it->second - 1][n - 1]) % mod;
  cout << ans << endl;
}
