A town is laid out as a grid. Two main roads cross in the town centre, and on the map the centre is the origin, one road runs along the axis and the other along the axis.
The two roads cut the map into the four quadrants, numbered to counter-clockwise: quadrant is everything with and , quadrant is and , quadrant is and , and quadrant is and . A point that lies on a road belongs to no quadrant at all.
A triangle is drawn on the map. Your task is to determine, for each of the four quadrants, whether the triangle has an interior point in it - a point strictly inside the triangle, not one lying on a side or in a corner.
Input
The first line contains a single integer - the number of testcases.
Each of the next lines contains six integers , , , , , - the three vertices of the triangle. The three vertices are never on one straight line, so the triangle always has positive area.
Output
For every testcase print a single line of four characters. The -th character is + if the triangle has an interior point in quadrant , and - if it does not.
Example
4 1 2 2 5 5 -10 -1 -1 1 5 5 1 -10 20 -5 15 -10 15 0 0 -3 1 1 -3
+--+ ++++ -+-- -+++
The first triangle lies entirely in , so quadrants and are out, and it reaches from down to , so it has interior points on both sides of the axis. The third triangle lies entirely in and entirely in , so only quadrant is possible. The fourth triangle has a vertex exactly at the origin and reaches into three quadrants, but not quadrant - it has interior points with and interior points with , and none with both and .
Constraints
This problem was adapted, with permission, from U kojim kvadrantima je trougao, authored by Društvo matematičara Srbije and Fondacija Petlja.