#!/usr/bin/python3

print(1,2)

count=1
i=3

while count<4000:
    prime=True
    for f in range (3,i,2):
        if (i%f==0):
            prime=False
            break
    if prime:
        count+=1
        print(count,i)
    i=i+2
