M = 100 print(M) for i in range(M): print(i%M + 1, (i+1)%M + 1)