N,K=map(int,input().split()) for x in range(K,N+1): if N%x==0: print(N//x) exit() print(1)