N, K = map(int, input().split()) for n in range(2, N+1): if N%n < 1: break print(N//n)