Abhikalpan  the tech-fest of IIITDMJ brings an amazing 
    competition of breaking love triangles. So the coordinators of the    
    event invite all triples from all over the world.

    A triple can have 2 boys and 1 girl or 2 girls and 1 boy =D.  
    So to break this triangle they have given a task. According to the 
    task two competitors 2 girls or 2 boys from triples have to shoot 
    the balls arranged in a row(there can be as many as possible balls in a row).

    According to the rule one contestant starts shooting from leftmost 
    to right one after another and the other contestant starts shooting  
    from rightmost to left one after another. 

    So event was going well for each triples , but as love triangles are very    complicated a strange thing happened during the contest , 
    both of the contestant from each triples shot one and the same ball at some 
    time. 

    At first they are fighting for a boy or girl but now they are fighting for 
    why they have shot the same ball ,they became furious and forgot the count of the the no. of balls initially at the row, But anyhow they remembered  
    the count of the balls which they have shot. 

    To get the winner each of the contestant among two now want to know   
    how many balls are not shot by the other contestant. 

 INPUT 

  The first line of each test file contains a integer t denoting the number of 
  test case.Each test case contains two numbers n and m representing 
  the number of balls shot by first and the second contestant
 OUTPUT 
 for each test case output two integers  separated by a space in new line  
   the number of balls that were not shot by first contestant  and the number of  
   balls that were not shot by second contestant, respectively.
 CONSTRAINTS 
 1< t< 1000 

   0 ≤ n,m <10^18
 

SAMPLE INPUT
1
7 4

SAMPLE OUTPUT
3 6
test_cases = int(raw_input())
i = 0
while(i<test_cases):
	f = raw_input().split(' ')
	bitch_1 = int(f[0])
	bitch_2 = int(f[1])
	total = bitch_1 + bitch_2 - 1
	print str(total-bitch_1),str(total-bitch_2)
	i += 1