H = 1 last = 1 ret = [] for _ in range(2000): ret.append((H, last + 1)) ret.append((last + 1, last + 2)) ret.append((last + 2, last + 3)) ret.append((last + 3, last + 4)) H = last + 2 last += 4 print(len(ret)) for a, b in ret: print(a, b)