#素因数分解 def Prime_Factorization(N): if N==0: return [[0,1]] if N<0: R=[[-1,1]] else: R=[] N=abs(N) if N&1==0: C=0 while N&1==0: N>>=1 C+=1 R.append([2,C]) if N%3==0: C=0 while N%3==0: N//=3 C+=1 R.append([3,C]) k=5 Flag=0 while k*k<=N: if N%k==0: C=0 while N%k==0: C+=1 N//=k R.append([k,C]) k+=2+2*Flag Flag^=1 if N!=1: R.append([N,1]) return R #================================================== N,M=map(int,input().split()) F=Prime_Factorization(M) X=1 Mod=10**9+7 D={} for p,e in F: if e not in D: DP=[0]*(e+1); DP[0]=1 for n in range(1,N+1): for i in range(1,e+1): DP[i]+=DP[i-1] DP.reverse() DP[e]=sum(DP)%Mod X*=DP[e] X%=Mod print(X)