P21561 [HackerEarth] SKITians are good with mensuration hence they like to play with geometric shapes like rectangles in the plane. You are given two rectangles as expected. The sides of each rectangle are p
普及
题目描述

SKITians are good with mensuration hence they like to play with geometric shapes like rectangles in the plane. You are given two rectangles as expected. The sides of each rectangle are parallel to the coordinate axes. Each rectangle is given by the coordinates of its lower left corner and its upper right corner.

You are given the (x,y) coordinates for both of the corners.

You are required to find out the following properties of the rectangles. There are four options:

If the rectangles have a non-zero area in common, then print "Rectangle"
Otherwise, if they have a common line segment with non-zero length, print "Line"
Otherwise, if they have a point in common, print "Point"
Otherwise, print "Apart" (in all four cases, the quotes are just for clarity and the output is case sensitive).

Input

First line of input contains an integer T that denotes the number of test cases.

Each test case contains two lines of input where both lines have four space separated integers representing x1 y1 x2 y2.
First line is for first rectangle and second line of input for second rectangle.

Output

Print appropriate response in a line for each test case.

Constraint
1 ≤ T ≤ 200
0 ≤ x1,y1,x2,y2 ≤ 1000

SAMPLE INPUT
3
0 1 2 3
2 0 5 2
0 0 1 1
1 1 5 2
1 1 2 2
3 1 4 2

SAMPLE OUTPUT
Line
Point
Apart

Explanation

Case #1:

As it is clear these two rectangles share a common line segment of length greater than zero.

Case #2:

In this case, both of rectangles only share a common point.

Case #3:

These two rectangles do not have anything common between then, hence they are "Apart" from each other.

输入格式

见题面

输出格式

见题面

样例输入
20 0 0 3 2 1 1 5 3 0 0 5 3 1 2 2 3 1 1 6 2 5 5 3 4 0 1 2 3 2 0 5 2 0 0 1 1 1 1 5 2 1 1 2 2 3 1 4 2 0 0 10 10 20 10 30 10 155 410 162 713 155 410 162 713 28 70 441 125 28 70 441 554 69 63 299 420 69 420 299 712 127 148 286 766 127 148 286 593 177 89 245 480 177 318 245 480 28 669 700 698 28 164 700 669 315 435 777 450 315 407 777 450 381 187 494 499 381 703 494 954 423 190 692 711 423 214 692 955 104 193 341 801 104 581 341 619 90 682 618 686 90 202 618 920 375 105 416 844 375 55 416 807 171 849 479 955 171 608 479 656
样例输出
Rectangle Rectangle Line Rectangle Rectangle Line Rectangle Apart Rectangle Rectangle Rectangle Rectangle Apart Line Line Point Line Line Point Line Apart Line Line Line Line Apart Rectangle Rectangle Line Rectangle