QUADRATE - Quadratic Equation

no tags 

Manohar is new to mathematics and now a days he is learning quadratic equations. He is learning that how to find for a given quadratic equation that whether equation has equal roots, imaginary roots or real but distinct roots. His teacher has given him some quadratic equations and told him to tell the nature of roots. Manohar is not sure for his solutions so he want your help. Write a program that determine the nature of roots.

Input

In the first line number of test cases is given (T <= 10). Then T lines follows each containing a quadratic equation in the form a*x*x + b*x + c = 0, where a, b, c are constants 0 < a < 1000 and -10000 <= b, c <= 10000.

Output

For each test case output "Equal roots.", "Imaginary roots." or "Distinct real roots." according to nature of the roots as explained above.

Example

Input:
2
x*x-2*x+1=0
2*x*x+5*x-3=0

Output:
Equal roots.
Distinct real roots.


Added by:Manohar Singh
Date:2011-02-23
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ADA95 ASM32 ASM64 BASH CLPS CLOJURE D ERL FORTRAN GO ICON ICK LUA NEM NICE OCAML PAS-GPC PIKE SCM guile SCM qobi ST TCL WHITESPACE
Resource:Manohar Singh