Alice and Bob take part in a Nim game training camp. Nim is a game of strategy in which two players take turns removing stones from distinct piles. On each turn, a player must remove at least one stone, and may remove any number of stones provided they all come from the same pile. The goal of the game is to take the last stone.
The camp consists of
- there must be at least one pile,
- the number of stones in each pile must be between
$l_i$ and$r_i$ , inclusive, - the sizes of all piles must be distinct.
Then they play the Nim game. Bob starts first, and both players follow the optimal strategy. If possible, Alice will choose the initial game state that allows her to win. If there are multiple such states, she will at first minimize the number of piles and second minimize the total number of stones. Your task is to help Alice.
The first line contains the number of training days
Print
2
1 6
1 2
3 6
-1 -1
In the first sample, Alice chooses three piles with
In the second sample, Alice can't win.