human
Alice and Bob play ping-pong with simplified rules.

During the game, the player serving the ball commences a play. The server strikes the ball then the receiver makes a return by hitting the ball back. Thereafter, the server and receiver must alternately make a return until one of them doesn't make a return.

The one who doesn't make a return loses this play. The winner of the play commences the next play. Alice starts the first play.

Alice has x stamina and Bob has y. To hit the ball (while serving or returning) each player spends 1 stamina, so if they don't have any stamina, they can't return the ball (and lose the play) or can't serve the ball (in this case, the other player serves the ball instead). If both players run out of stamina, the game is over.

Sometimes, it's strategically optimal not to return the ball, lose the current play, but save the stamina. On the contrary, when the server commences a play, they have to hit the ball, if they have some stamina left.

Both Alice and Bob play optimally and want to, firstly, maximize their number of wins and, secondly, minimize the number of wins of their opponent.

Calculate the resulting number of Alice's and Bob's wins.

Input

The first line contains a single integer t (1 ≤ t ≤ 10^4) — the number of test cases.

The first and only line of each test case contains two integers x and y (1 ≤ x, y ≤ 10^6) — Alice's and Bob's initial stamina.

Output

For each test case, print two integers — the resulting number of Alice's and Bob's wins, if both of them play optimally.

Example

Input

3
1 1
2 1
1 7

Output

0 1
1 1
0 7

Note

In the first test case, Alice serves the ball and spends 1 stamina. Then Bob returns the ball and also spends 1 stamina. Alice can't return the ball since she has no stamina left and loses the play. Both of them ran out of stamina, so the game is over with 0 Alice's wins and 1 Bob's wins.

In the second test case, Alice serves the ball and spends 1 stamina. Bob decides not to return the ball — he loses the play but saves stamina....
Using python3 can you solve the prior task?
 Can you provide a Python code to print two integers — the resulting number of Alice's and Bob's wins, if both of them play optimally?
assistant
#Here is Python code to print two integers — the resulting number of Alice's and Bob's wins, if both of them play optimally.

# Competitive Programming Template --> Ankit Josh

import os
from math import factorial
import sys
from io import BytesIO, IOBase

def inp(): return sys.stdin.readline().strip()
def IIX(): return (int(x) for x in sys.stdin.readline().split())
def II(): return (int(inp()))
def LI(): return list(map(int, inp().split()))
def LS(): return list(map(str, inp().split()))
def L(x):return list(x)
def out(var): return sys.stdout.write(str(var))

#Graph using Ajdacency List

class GraphAL:
    def __init__(self,Nodes,isDirected=False):
        self.nodes=[x for x in range(1,Nodes+1) ]
        self.adj_list={}
        self.isDirected=isDirected
        for node in self.nodes:
            self.adj_list[node]=[]
    
    def add_edge(self,x,y):
        self.adj_list[x].append(y)
        if self.isDirected==False:
            self.adj_list[y].append(x)
    
    def return_graph(self):
        return(self.adj_list)

#Graph using Ajdacency Matrix

class GraphAM:
    def __init__(self,Nodes,isDirected=False):
        self.adj_matrix=[ [0]*(Nodes+1) for x in range(Nodes+2)]
        self.isDirected=isDirected

    def add_edge(self,x,y):
        if self.isDirected:
            self.adj_matrix[x][y]=1
        elif self.isDirected==False:
            self.adj_matrix[x][y]=1
            self.adj_matrix[y][x]=1
    
    def delete_edge(self,x,y):
        if self.isDirected:
            self.adj_matrix[x][y]=0
        if self.isDirected==False:
            self.adj_matrix[x][y]=0
            self.adj_matrix[y][x]=0
    
    def degree(self,x):
        l=self.adj_matrix[x]
        return l.count(1)

    def return_graph(self):
        return self.adj_matrix


'''
nodes=II() 
edges=II() 
graph=GraphAL(nodes) #Add 'True' to the Graph method, for directed graph
connections=[]
for i in range(edges):
    l=LI()
    connections.append(l)

for connect in connections:
    graph.add_edge(connect[0],connect[1])

grp=graph.return_graph()
'''

#Code goes here

def solve():
    #Start coding
    x,y=IIX()
    #lst=[(x*(x+1)//2) for x in...