N = int(input()) ans = 0 now = 1 while now <= N: print(now * 2,now) print(*list(range(now))) u = int(input()) v = 5 - u ans += v * now now *= 2 print(0,1) print(ans)