#include <bits/stdc++.h>
using namespace std;
vector<unsigned long long> primos;
map<unsigned long long, unsigned long long> pan;
unsigned long long yu = 1;
unsigned long long gcd(unsigned long long a, unsigned long long b) {
  if (a < b) {
    unsigned long long tmp = a;
    a = b;
    b = tmp;
  }
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
unsigned long long combi(unsigned long long a, unsigned long long b) {
  if (b == 0 or b == a) {
    yu = yu * 1;
    return 0;
  }
  if (b == 1 or b == a - 1) {
    yu = (yu * a) % 1000000007;
    return 0;
  }
  unsigned long long c = a - b;
  if (c > b) {
    unsigned long long tmp = c;
    c = b;
    b = tmp;
  }
  vector<unsigned long long> product;
  for (unsigned long long i = b + 1; i <= a; i++) {
    product.push_back(i);
  }
  for (unsigned long long i = 1; i <= c; i++) {
    unsigned long long moho = i;
    unsigned long long k = 0;
    while (moho != 1) {
      unsigned long long d = gcd(product[k], moho);
      if (d > 1) {
        product[k] = product[k] / d;
        moho = moho / d;
      }
      k++;
    }
  }
  for (unsigned long long i = 0; i < product.size(); i++) {
    yu = (yu * product[i]) % 1000000007;
  }
}
unsigned long long descomponer(unsigned long long a) {
  if (a == 1) {
    return 0;
  } else if (a == 2) {
    pan[2]++;
    return 0;
  } else if (a == 3) {
    pan[3]++;
    return 0;
  }
  unsigned long long k = 0;
  while (primos[k] <= sqrt(a) and k < primos.size()) {
    while (a % primos[k] == 0) {
      pan[primos[k]]++;
      a = a / primos[k];
    }
    k++;
  }
  if (a != 1) {
    pan[a]++;
  }
  return 0;
}
int main() {
  long long jeur;
  unsigned long long ji = sqrt(1000000000);
  vector<unsigned long long> vec(ji);
  primos.push_back(2);
  for (unsigned long long i = 3; i <= ji; i = i + 2) {
    if (vec[i] == 0) {
      primos.push_back(i);
      unsigned long long k = i * i;
      while (k <= ji) {
        vec[k] = 1;
        k = k + 2 * i;
      }
    }
  }
  unsigned long long h;
  cin >> h;
  for (unsigned long long i = 0; i < h; i++) {
    unsigned long long g;
    cin >> g;
    descomponer(g);
  }
  for (std::map<unsigned long long, unsigned long long>::iterator i =
           pan.begin();
       i != pan.end(); i++) {
    combi(h + (i->second) - 1, i->second);
  }
  cout << yu << endl;
}
