시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 (추가 시간 없음) 1024 MB67201726.984%

문제

Two players are playing famous game Nim. They are given $n$ heaps of stones, $i$-th of them contains $a_i$ stones. Two players alternate taking any positive number of stones from any single heap. The goal is to be the last to take a stone. It's obvious that this game has predetermined result in case both players are acting optimally. In this problem you should answer how long the game will last if losing player is trying to play as long as possible, but the winning player is trying to finish it as soon as possible without making any moves that could lead him to lose the game. You should also output one of the first possible turns of the first player, that leads to the described result.

입력

The first line of input contains a positive integer $n$ ($1\leq n\leq 10^5$).

The second line contains $n$ positive integers $a_i$ ($1\leq a_i\leq 10^{12}$) --- the sizes of heaps.

출력

In the first line output a positive integer --- how many turns the game will last if both players are playing optimally.

In the second line output the turn of the first player in format $i k$, where $i$ is the index of the heap and $k$ is the number of stones taken from the $i$-th heap. If there are multiple possible turns which lead to the optimal result, you may output any of them.

예제 입력 1

2
1 3

예제 출력 1

3
2 2

예제 입력 2

2
2 2

예제 출력 2

4
1 1