Playing with divisor

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define mod 1000000007

/*
N=p^kq^lr^m
number of factor f=(k+1)(l+1)(m+1)
product of factorP=N^f/2=p^kf/2.q^lf/2.r^mf/2
number of divisors of P=(k
f/2+1)(lf/2+1)(rf/2+1)
/
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int x;cin>>x;
ll A[x],f=1,res=1;
for(int i=0;i<x;i++)
{
cin>>A[i];
f=(f
(A[i]+1)+mod)%mod;
}
f=(f%mod*500000004)%mod;

for(int i=0;i<x;i++)
{
res=((res*((A[i]*f+1)+mod)%mod)+mod)%mod;
}
cout<<(res)%mod;
return 0;
}