Nikolay has only recently started in competitive programming, but already qualified to the finals of one prestigious olympiad. There going to be $n$ participants, one of whom is Nikolay. Like any good olympiad, it consists of two rounds. Tired of the traditional rules, in which the participant who solved the largest number of problems wins, the organizers came up with different rules.

Suppose in the first round participant A took $x$-th place and in the second round — $y$-th place. Then the total score of the participant A is sum $x + y$. The overall place of the participant A is the number of participants (including A) having their total score less than or equal to the total score of A. Note, that some participants may end up having a common overall place. It is also important to note, that in both the first and the second round there were no two participants tying at a common place. In other words, for every $i$ from $1$ to $n$ exactly one participant took $i$-th place in first round and exactly one participant took $i$-th place in second round.

Right after the end of the Olympiad, Nikolay was informed that he got $x$-th place in first round and $y$-th place in the second round. Nikolay doesn't know the results of other participants, yet he wonders what is the minimum and maximum place he can take, if we consider the most favorable and unfavorable outcome for him. Please help Nikolay to find the answer to this question.


-----Input-----

The first line contains an integer $t$ ($1 \le t \le 100$) — the number of test cases to solve.

Each of the following $t$ lines contains integers $n$, $x$, $y$ ($1 \leq n \leq 10^9$, $1 \le x, y \le n$) — the number of participants in the olympiad, the place that Nikolay took in the first round and the place that Nikolay took in the second round.


-----Output-----

Print two integers — the minimum and maximum possible overall place Nikolay could take.


-----Examples-----
Input
1
5 1 3

Output
1 3

Input
1
6 3 4

Output
2 6



-----Note-----

Explanation for the first example:

Suppose there were 5 participants A-E. Let's denote Nikolay as A. The the most favorable results for Nikolay could look as follows: $\left. \begin{array}{|c|c|c|c|c|} \hline \text{Participant} & {\text{Round 1}} & {\text{Round 2}} & {\text{Total score}} & {\text{Place}} \\ \hline A & {1} & {3} & {4} & {1} \\ \hline B & {2} & {4} & {6} & {3} \\ \hline C & {3} & {5} & {8} & {5} \\ \hline D & {4} & {1} & {5} & {2} \\ \hline E & {5} & {2} & {7} & {4} \\ \hline \end{array} \right.$ 

However, the results of the Olympiad could also look like this: $\left. \begin{array}{|c|c|c|c|c|} \hline \text{Participant} & {\text{Round 1}} & {\text{Round 2}} & {\text{Total score}} & {\text{Place}} \\ \hline A & {1} & {3} & {4} & {3} \\ \hline B & {2} & {2} & {4} & {3} \\ \hline C & {3} & {1} & {4} & {3} \\ \hline D & {4} & {4} & {8} & {4} \\ \hline E & {5} & {5} & {10} & {5} \\ \hline \end{array} \right.$ 

In the first case Nikolay would have taken first place, and in the second — third place.

Difficulty: interview

Starter code:

Solutions:
t = int(input())
for _ in range(t):
  n,x,y = map(int,input().split())
  s = x+y
  mx = min(s-1,n)
  if s<=n:
    mn = 1
  else:
    mn = min(s,s-n+1,n)
  print(mn,mx)

t = int(input())
for _ in range(t):
    n, x, y = [int(item) for item in input().split()]
    total = x + y
    maximum = min(x + y - 1, n)
    minimum = min(n - min((2 * n - total), n) + 1, n)
    print(minimum, maximum)

def solve():
    n,a,b = list(map(int,input().split()))
    worst = a+b-1
    if a+b>=n+1:
        worst = n
    best = min(n,a+b-n+1)
    if a+b<=n:
        best = 1
    print(best,worst)
t = int(input())
for _ in range(t):
    solve()


import sys
input = sys.stdin.readline

t = int(input())
for _ in range(t):
    n,x,y = map(int,input().split())
    ans2 = max(min(x + y - 1, n), 1)
    ans1 = min(max(1, x + y - n + 1), n)
    print(ans1, ans2)

for _ in range(int(input())) :
    n, x, y = list(map(int, input().split()))
    print(min(max(x + y + 1 - n, 1), n), min(n, x + y - 1))


import sys
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__

def solve():
    n,x,y = list(map(int, input().split()))
    if x>y:
        x,y = y,x
    x1 = min(x-1, max(0, n-y-1))
    y1 = min(y-1, max(0, n-x-1))
    x_left = x-1 - x1
    y_left = y-1 - y1
    mi = 1 + max(x_left, y_left)
    x1 = min(x-1,n-y)
    x2 = x-1 - x1
    y1 = min(y-1, n-x)
    y2 = y-1 - y1
    ma = x1+y1+min(x2,y2)+1
    print(mi, ma)

t = int(input())
for i in range(t):
    solve()



T = int(input())
for kse in range(T):
	n, x, y = map(int, input().split())
	R = x+y-1
	R = min(n, R)
	L = x+y-n+1
	L = max(1, L)
	L = min(L, n)
	print(L, R)

t = int(input())
for _ in range(t):
	n, x, y = map(int, input().split())
	if x + y - 1 <= n:
		maxi = x + y - 1
	else:
		maxi = n
	if max(x, y) < n:
		mini = 1 + max(0, x+y-n)
	elif x == y == n:
		mini = n
	else:
		mini = min(x, y) + 1
	print(mini, maxi)

t=int(input())
for tt in range(t):
    n,x,y=list(map(int,input().split()))
    mi = min(max(1, x + y - n + 1), n)
    k = n - ( 0 if x+y > n else n-x-y+1)
    print(mi, k)


t = int(input())
for case_num in range(t):
    n, x, y = list(map(int, input().split(' ')))
    best = 1
    if x + y > n:
        best = min(x + y - n + 1, n)
    worst = min(x + y - 1, n)
    print(best, worst)


t = int(input())
inputs = [input() for i in range(t)]

def solve(line):
    n,x,y = map(int, line.split())

    mx = max(min(n,x+y-1),1)
    mn = min(max(1,n-((n-x)+(n-y)-1)),n)

    print(str(mn)+" "+str(mx))

[solve(line) for line in inputs]

T = int(input())
for _ in range(T):
    n, x, y = list(map(int, input().split()))

    if x > y:
        x, y = y, x

    ans1 = 1 if x + y <= n else x + y - n + 1

    if ans1 > n:
        ans1 -= 1

    ans2 = n if x + y > n else x + y - 1

    print(ans1, ans2)


def main():
    import sys
    input = sys.stdin.readline

    for _ in range(int(input())):
        N, x, y = list(map(int, input().split()))

        worst = min(x+y-1, N)
        if x + y + 1 - N <= 1:
            best = 1
        else:
            best = min(x + y + 1 - N, N)
        print(best, worst)


def __starting_point():
    main()

__starting_point()

import sys

# inf = open('input.txt', 'r')
# reader = (line.rstrip() for line in inf)
reader = (line.rstrip() for line in sys.stdin)
input = reader.__next__

t = int(input())
for _ in range(t):
    n, x, y = list(map(int, input().split()))
    below1 = max(n - x - (y - 1), 0)
    below2 = max(n - y - (x - 1), 0)
    worst = n - max(below1, below2)
    above1 = min(max(x - 1 - (n - y - 1), 0), n - 1)
    above2 = min(max(y - 1 - (n - x - 1), 0), n - 1)
    best = max(above1, above2) + 1
    print(best, worst)
    
# inf.close()