a = int(input())
for i in range(a + 1):
    if i > 1 and a % i == 0:
        print(i)
        break

b480f108aac1b94993e2bb49d0d066109882ca23
<mask token>

<mask token>
for i in range(a + 1):
    if i > 1 and a % i == 0:
        print(i)
        break

a = int(input())
for i in range(a + 1):
    if i > 1 and a % i == 0:
        print(i)
        break
