N,K=map(int,input().split()) M=1 for k in range(2,N+1): if N%k==0: M=max(M,N//k) print(M)