#include <bits/stdc++.h>
using namespace std;
long long ans = 1, n, MOD = 1e9 + 7, c[509][509 * 32];
map<int, int> m;
int main() {
  cin >> n;
  for (int i = 0, x; i < n; i++) {
    cin >> x;
    for (int j = 2; j * j <= x; j++)
      while (x % j == 0) m[j]++, x /= j;
    if (x > 1) m[x]++;
  }
  for (int i = 0; i < 509 * 32; i++)
    for (int j = 0; j <= min(i, 508); j++)
      c[j][i] = (j == 0 || i == 0 ? 1 : c[j][i - 1] + c[j - 1][i - 1]) % MOD;
  for (auto i : m) ans = ans * c[n - 1][i.second + n - 1] % MOD;
  cout << ans;
}
