import sys input = sys.stdin.readline import math N,K=map(int,input().split()) mod=10**9+7 # 行列の計算(numpyを使えないとき,modを使用) def prod(A,B,k,l,m):# A:k*l,B:l*m C=[[None for i in range(m)] for j in range(k)] for i in range(k): for j in range(m): ANS=0 for pl in range(l): ANS=(ANS+A[i][pl]*B[pl][j])%mod C[i][j]=ANS return C def plus(A,B,k,l):# a,B:k*l C=[[None for i in range(l)] for j in range(k)] for i in range(k): for j in range(l): C[i][j]=(A[i][j]+B[i][j])%mod return C x=N L=int(math.sqrt(x)) FACT=dict() for i in range(2,L+2): while x%i==0: FACT[i]=FACT.get(i,0)+1 x=x//i if x!=1: FACT[x]=FACT.get(x,0)+1 def calc(x): X=[0]*(x+1) X[-1]=1 X=[X] A=[[0]*(x+1) for i in range(x+1)] for i in range(x+1): for j in range(x+1): if j-i<=0: A[i][j]=1 POWA=[A] #print(A) for i in range(60): POWA.append(prod(POWA[-1],POWA[-1],x+1,x+1,x+1)) # ベキを求めて n=K while n: X=prod(X,POWA[n.bit_length()-1],1,x+1,x+1) # n乗の場合 n-=1<<(n.bit_length()-1) #print(X) return sum(X[0]) ANS=1 for f in FACT: ANS*=calc(FACT[f]) ANS%=mod print(ANS%mod)