N = int(input()) for i in range(N): x, y = map(int, input().split()) print(N // 2) for i in range(N // 2): print(i * 2 + 1, i * 2 + 2)