Submeter | Todas submissőes | Melhores | Voltar |
Problem hidden
BABA1 - ARE YOU GOOD IN MATHS? |
BABA taught properties of right angled triangle and asked a questions: "Can you find a right angled triangle whose length of hypotenuse is H and its area is A?"
INDIAN students can answer quickly.
Input
The first line of the input contains a single integer T (where 1 ≤ T ≤ 10^5) denoting the number of test-cases. T test cases follow.
For each test case, there will be a single line containing two space separated integer H and A (where 1 ≤ H ≤ 10^6 and 1 ≤ A ≤ 10^12).
Output
Output the answer for each test-case in a single line. If it is not possible to find such a triangle, output -1.
Otherwise print 3 real numbers corresponding to the lengths of the sides of the triangle sorted in non-decreasing order.
NOTE: give your answer with 6 decimal places.
Example
Input: 4 24252 56578987908 1 1 2 2 10 10 Output: -1 -1 -1 2.043096 9.789063 10.000000
Adicionado por: | junior_g |
Data: | 2017-02-14 |
Tempo limite: | 1s |
Tamanho do fonte: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Linguagem permitida: | Todas exceto: ADA95 ASM32-GCC ASM32 ASM64 BASH BC BF CLOJURE COBOL COFFEE D-CLANG D D-DMD DART ELIXIR ERL FSHARP FANTOM FORTH FORTRAN PERL6 PY_NBC SCALA CHICKEN TCL |