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