N=10**6//4 n=N//8 ans=[] dxy = [] for i in range(1,n+1): dxy.append((i,1)) dxy = dxy[::-1] for i in range(2,n+2): dxy.append((1,i)) x,y=0,-10**9 for dx,dy in dxy: x+=dx y+=dy ans.append(f"{x} {y}") for dx,dy in dxy[::-1]: x-=dx y+=dy ans.append(f"{x} {y}") for dx,dy in dxy: x-=dx y-=dy ans.append(f"{x} {y}") for dx,dy in dxy[::-1]: x+=dx y-=dy ans.append(f"{x} {y}") print(N) print("\n".join(ans))