## D. Makoto and a Blackboard(积性函数,期望dp)

D. Makoto and a Blackboard

time limit per test

2 seconds

memory limit per test

256 megabytes

input

standard input

output

standard output

Makoto has a big blackboard with a positive integer nn written on it. He will perform the following action exactly kk times:

Suppose the number currently written on the blackboard is vv. He will randomly pick one of the divisors of vv (possibly 11 and vv) and replace vv with this divisor. As Makoto uses his famous random number generator (RNG) and as he always uses 5858 as his generator seed, each divisor is guaranteed to be chosen with equal probability.

He now wonders what is the expected value of the number written on the blackboard after kk steps.

It can be shown that this value can be represented as PQPQ where PP and QQ are coprime integers and Q≢0(mod109+7)Q≢0(mod109+7). Print the value of P⋅Q−1P⋅Q−1 modulo 109+7109+7.

Input

The only line of the input contains two integers nn and kk (1≤n≤10151≤n≤1015, 1≤k≤1041≤k≤104).

Output

Print a single integer — the expected value of the number on the blackboard after kk steps as P⋅Q−1(mod109+7)P⋅Q−1(mod109+7) for PP, QQ defined above.

Examples

input

Copy

```6 1
```

output

Copy

```3
```

input

Copy

```6 2
```

output

Copy

```875000008
```

input

Copy

```60 5
```

output

Copy

```237178099
```

Note

In the first example, after one step, the number written on the blackboard is 11, 22, 33 or 66 — each occurring with equal probability. Hence, the answer is 1+2+3+64=31+2+3+64=3.

In the second example, the answer is equal to 1⋅916+2⋅316+3⋅316+6⋅116=1581⋅916+2⋅316+3⋅316+6⋅116=158.

``````#include<bits/stdc++.h>
using namespace std;
#define Sheryang main
const int maxn=1e5+7;
typedef long long ll;
const int mod=1e9+7;
ll read(){ll c = getchar(),Nig = 1,x = 0;while(!isdigit(c) && c!='-')c = getchar();if(c == '-')Nig = -1,c = getchar();while(isdigit(c))x = ((x<<1) + (x<<3)) + (c^'0'),c = getchar();return Nig*x;}

/* keep hungry and keep calm! */
ll dp[(int)1e4+7],n,k,inv;

ll qpow(ll a,ll b){
ll ans=1;a%=mod;
while(b){
if(b&1) ans=(ans*a)%mod;
a=(a*a)%mod;b/=2;
}
return ans;
}

ll solve(ll p,int e){
dp[e]=1;
for(int i=0;i<e;i++) dp[i]=0;

for(ll i=1;i<=k;i++){
for(int j=0;j<=e;j++){
dp[i][j]=0;
for(int k=j;k<=e;k++){
dp[i][j]=(dp[i][j]+dp[i-1][k]*inv[k+1]%mod)%mod;
}
}
}
ll tmp=0,t=1;
for(int i=0;i<=e;i++){
tmp=(tmp+t*dp[k][i]%mod)%mod;
t=(t*p)%mod;
}
return tmp;
}

int Sheryang()
{
inv=1;
for(int i=2;i<=60;i++){
inv[i]=qpow(i,mod-2);
}

ll ans=1;

for(ll i=2;i*i<=n;i++){
int cot=0;
while(n%i==0) cot++,n/=i;
if(cot) ans=(ans*solve(i,cot)%mod)%mod;
}
if(n>1) ans=(ans*solve(n,1)%mod)%mod;

printf("%lld\n",ans);
return 0;
}
``````