#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <map>
using namespace std;
typedef long long LL;
const int mod = 1e9 + 7;
int main()
{
int n,x;
cin >> n;
unordered_map<int,int> mp;
LL res = 1;
while(n --)
{
cin >> x;
for(int i = 2;i <= x / i;i++)
{
while(x % i == 0)
{
x /= i;
mp[i] ++;
}
}
if(x > 1) mp[x]++;
}
for(auto i : mp)
{
int p = i.first,a = i.second;
LL t = 1;
while(a --)
{
t = (t * p + 1) % mod;
}
res = res * t % mod;
}
cout << res << endl;
return 0;
}