A computer program named Eunoia is successful if it is able to place two checkers in a x grid-board(a rectangular board that has x cells) such that both the below conditions are satisfied :
Else, the program has failed.
Find the success probability of Eunoia if it randomly places the checkers on the board.
Note: Both the checkers cannot be placed in the same cell.
Input Format: -
First line contains – no of testcases. Next lines has two spaced integers and .
Output Format: -
Print lines, the ith line corresponds to the answer of ith test case where two spaced integers and are output denoting the success probability, / where P and Q are co-prime.
if the probability is 0, output "0 1" in-place of P and Q.
Constraints:
1 <= <= 100
1 <= , <= 109
+ >= 3