EDGE=[] for i in range(1,1003): EDGE.append((i,i+1)) now=1004 for j in range(4): EDGE.append((1,now)) now+=1 for i in range(2,1003): for j in range(6): EDGE.append((i,now)) EDGE.append((now,now+1)) now+=2 print(len(EDGE)+1) for x,y in EDGE: print(x,y)