URI Online Judge | 2561


By Flávio Zavan, UFPR BR Brazil

Timelimit: 1

Vasya and Petya love scavenger hunt. The game is assisted by a dedicated website, where they can access the coordinates of the treasures, directions to go and hints on how to find them.

After years of experience and more than 8192 treasures found, Vasya decided to not only find them, but also hide them. Ambitious, he wants to create an epic experience, to be remembered for the rest of the life of the ones who will try to find them. The boy decided to unite his knowledge on geometry with his hobby to create such terrific challenge.

The hunters will receive the description of two rectangles R0 and R1. The treasure is hidden in the intersection area of R0 with R1.

However, there are some rules that must be followed in order to the challenge to be included in the website. The search area must not exceeded 10 m2. Hence, Vasya asked Petya to check the quality of the challenge. Petya must state whether the search area has adequate size, the rectangles has no intersection, the search area is too large, it is just a line segment or it is just a point.

Petya under graduated in Culinary, and hence is not that good in geometry. He cannot solve his friend’s problem and is asking for your help.


The input contains several test cases. Each test case contains two lines. Each line describe a rectangle with four integers giving two coordinates (in meters) X0, Y0, X1 and Y1 (0 ≤ X0 < X1 ≤ 1000 and 0 ≤ Y0 < Y1 ≤ 1000), the coordinates of two opposite vertices of the rectangle.

The input ends with end-of-file (EOF).


For each test case, print a single line containing: adequada if the search area has adequate size and is not a line segment nor a point; linha if it is just a line segment; ponto, if it is just a point; inexistente, if it does not exist; or grande, if it is too large.

Input Sample Output Sample

0 0 40 40
39 0 40 40
0 0 40 40
39 39 40 40