Sin Cos Problem

Given A and B, you have to determine the maximum value of the function : F(θ) = A ∗ Sinθ + B ∗ Cosθ Input First line of input will contain the number of test cases, T ≤ 2000. Then there follows T lines, each containing two integers A and B separated by a single space. A and B will fit in a signed 32bit integer. Output For each case, print one line containing two single space separated real values rounded to two decimal places. The first one is the lowest non-negative value of θ (θ is in Radian) for which the F(θ) gives maximum value and the second one is the maximum value. Note: Pi is considered to be arccos(−1). Sample Input 4 11 -1 1 1 -1 -1 -1 Sample Input 0.79 1.41 5.50 1.41 2.36 1.41 3.93 1.41