#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
const int N = 1e6 + 10;
vector<bool> yo(N, true);
vector<int> primes;
void sieve() {
yo[0] = yo[1] = false;
for (int i = 2; i * i < N; i++) {
if (yo[i]) {
for (int j = i * i; j < N; j += i) {
yo[j] = false;
}
}
}
primes.push_back(2);
for (int i = 3; i < N; i += 2) {
if (yo[i]) {
primes.push_back(i);
}
}
}
bool isprime(int x) { return yo[x]; }
void solve(int cs) {
sieve();
map<int, int> cnt;
int n;
cin >> n;
for (int i = 0; i < n; i++) {
int x;
cin >> x;
if (isprime(x)) {
cnt[x] += 1;
} else {
for (auto &p : primes) {
if (p > x)
break;
while (x % p == 0) {
x /= p;
cnt[p] += 1;
}
}
if (x > 1) {
cnt[x] += 1;
}
}
}
int res = 1;
const int mod = 1e9 + 7;
for (auto &[_, cc] : cnt) {
res = res * 1LL * (cc + 1) % mod;
}
cout << res << "\n";
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int tc = 1;
// cin >> tc;
for (int cs = 1; cs <= tc; cs++) {
solve(cs);
}
return 0;
}