H = 1 last = 1 ret = [] for _ in range(1001): 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) + 1) print(*["{} {}".format(*x) for x in ret], sep="\n")