Conics for Intrepid

0

0 votes
Easy
Problem

Many of the NITS students go to give tuitions in the city on weekends. One of them came up with the chapter of conic sections in Maths. As many Questions needed us to find the kind of conic the equation represents, he decided to make a program that takes the values of a, b, c, f, g and h for the equation

        ax2+2hxy+by2+2gx+2fy+c=0 (general equation of a conic) 

and prints the kind of conic it represents.
As he is busy with his tuitions, he needs your help in making the program.

Input:
First line of input contains the integer t - no of test cases.
Next t lines contains the values for the variables a, b, c, f, g and h separated by spaces.

Output:
For every test case in a new line print:
"Parallel Lines" (without quotes) if it represents parallel lines,
"Intersecting Lines" (without quotes) if it represents intersecting lines,
"Circle" (without quotes) if it represents a circle,
"Ellipse" (without quotes) if it represents an ellipse,
"Parabola" (without quotes) if it represents a parabola, and
"Hyperbola" (without quotes) if it represents a hyperbola.
NOTE: Provided inputs are sure to represent one of the given conic section.

Constraints:

1 ≤ t ≤ 10

-1000 ≤ a, b, c, f, g, h ≤ 1000

Problem Setter: HARSH GANDA

Time Limit: 1
Memory Limit: 256
Source Limit:
Explanation

In the 1st test case:
a=2, b=2, c=2, f=2, g=2 ,h=2
so the equation is x2+y2+2xy+2x+2y+1=0 which simplifies to
x+y+1=0 and x+y+1=0 i.e. 2 parallel (overlapping) lines.

In the 2nd test case:
a=1, b=2, c=-27, f=2, g=2, h=0
so the equation is x2+2y2+4x+4y-27=0 which simplifies to
(x+2)2+2(y+1)2=33 i.e. the equation of an ellipse.

Editor Image

?