#include <bits/stdc++.h>
using namespace std;
int n;
long long a, c[20002][505];
map<int, int> pa;
int main() {
  for (int i = 0; i < 20000; i++) {
    c[i][0] = 1;
    if (i)
      for (int j = 1; j < 505; j++)
        c[i][j] = (c[i - 1][j - 1] + c[i - 1][j]) % 1000000007;
  }
  long long res = 1;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a;
    int k = sqrt(a), t = 2;
    while (a > 1 && t <= k) {
      if (a % t == 0)
        a /= t, pa[t]++;
      else
        t++;
    }
    if (a > 1) pa[a]++;
  }
  for (map<int, int>::iterator it = pa.begin(); it != pa.end(); it++) {
    res *= c[n - 1 + it->second][n - 1], res %= 1000000007;
  }
  cout << res;
}
