Professor Leyni likes to help LOLIs with their math. This time, Leyni meets several LOLIs in the classroom and gets several problems about "Intersecting Lines". The LOLIs want to know how and where two lines intersect.Leyni asks you to help him to answer.
Input
There are multiple test cases. The first line of input is an integer T indicating the number of test cases. Then T test cases follow. For each test case: Line 1. This line contains eight integers. These integers represent the coordinates of four points on the plane in the order x1y1x2y2x3y3x4y4. Thus each of these input lines represents two lines on the plane: the line through (x1,y1) and (x2,y2) and the line through (x3,y3) and (x4,y4). The point (x1,y1) is always distinct from (x2,y2). Likewise with (x3,y3) and (x4,y4). All numbers required by this problem will be in the range [-1000, 1000].
Output
For each test case: Line 1.If there is no intersection, output "NONE". If they are the same line, output "LINE". Otherwise output the x and y coordinates of the point, correct to two decimal places as the sample output.
POINT 2.00 2.00 NONE LINE POINT 2.00 5.00 POINT 1.07 2.20
Hint
A pair of distinct points on a plane defines a line and that a pair of lines on a plane will intersect in one of three ways: 1) no intersection because they are parallel, 2) intersect in a line because they are on top of one another (i.e. they are the same line), 3) intersect in a point.