N,K=map(int,input().split()) for i in range(N-1,0,-1): if(N%i==0): print(i) break