# Jumps on strip

# Jumps on strip

The horizontal strip **1** x **n** is divided into cells of size **1** x **1**. In the cell with number **s** there is a checker piece. In the first turn, a piece should move one cell (left or right). Second move should be made through two cells, etc. Each next move should be greater than previous one by **1**. So it has been continued while a checker piece has moves not overstepping the bounds of strip.

Your task is to determine maximal and minimal numbers of moves that a piece can move.

#### Input

The first line contains the number of test cases **t** (**1** ≤ **t** ≤ **20**). Each of following **t** lines consists of two integer numbers **n** and **s** (**1** ≤ **n** ≤ `10`

, ^{18}**1** ≤ **s** ≤ **n**), defining data of corresponding case.

#### Output

Output file should be contains **t** lines. The each of lines should be consists two integer number: maximal and minimal numbers of moves of a checker piece for corresponding test case.

2 3 2 6 2

2 2 5 3