x = int(input())
y=2
while (x/y)>=1:
    if (x%y)==0:
        print(y)
        break
    y+=1

167c5d1a8182a0960b64a97b0bb59bc341eb8316
<mask token>

<mask token>
while x / y >= 1:
    if x % y == 0:
        print(y)
        break
    y += 1

x = int(input())
y = 2
while x / y >= 1:
    if x % y == 0:
        print(y)
        break
    y += 1

x = int(input())
y=2
while (x/y)>=1:
    if (x%y)==0:
        print(y)
        break
    y+=1
