import sys sys.setrecursionlimit(3*10**5) n,k = map(int,input().split()) mod = 10**9+7 divs = [i for i in range(2*10**5)] for i in range(2,2*10**5): if divs[i] != i: continue for j in range(i,2*10**5,i): divs[j] = min(divs[j],i) def dfs(n,k): if k == 0: return n if n == 1: return 1 if n == 2: s = (k+1)//2 p = pow(2,s,mod-1) if k%2: return pow(3,p,mod) else: return pow(2,p,mod) ans = 1 dic = {} now = n while now != 1: d = divs[now] dic[d] = dic.get(d,0)+1 now //= d for d,num in dic.items(): nd = d+1 while nd != 1: nnd = divs[nd] ans *= pow(dfs(nnd,k-1),num,mod) nd //= nnd return ans print(dfs(n,k))