# your code goes here N,K=(int(i) for i in input().split()) i=2 j=2 g=[0] if K==1: g=[N,1] while g[-1]!=1: i=j while N%i!=0 and i*i<=N and g[-1]!=1: i+=1 if i*i<=N and g[-1]!=1: # if i>=K: g.append(N//i) g.append(1) # else: # g.append(i) # N//=i # j=i elif i*i>N: g.append(1) if g[0]==0: g[0]=1 p=1 for i in range(len(g)): p*=g[i] print(p)