SP6831 TBGAME - Two Ball Game
Description
Lizarb's national soccer team undoubtedly belongs to the group of favourites to win the World Cup at the upcoming championship. Their greatest advantages are their excellent dribbling skills and the ball passing precision. Particularly, each player can pass the ball to every other player on the playing field at any distance. The team's captain, Oicul, claims that an exercise which certainly has a substantial effect on the team's soccer skills is the so-called "Two-ball Game".
In the two-ball game, _n > 4_ kickers are positioned on the playing field and do not move (i.e.\\ change their locations) during the game. Four of the players are distinguished: two of them, denoted as _s $ _{1} $_ and _s $ _{2} $_ , are called starting players, and two others, denoted as _t $ _{1} $_ and _t $ _{2} $_ , are called terminal players. At the beginning, player _s $ _{1} $_ has got a white ball and _s $ _{2} $_ possesses a black ball. Then each starting player can kick the ball directly to the corresponding terminal player but he can also kick the ball to any other player on the field and this player can pass the ball to the next one, and so on. The aim is that at the end the white ball is in possession of _t $ _{1} $_ and the black ball in possession of _t $ _{2} $_ . So, it seems the game is quite simple. However, to avoid ball collisions, the constraint of the game is that no ball trajectories cross each other and that no player (including starting and terminal ones) has more than one ball contact. For simplicity, we assume the trajectory of a ball moving from one player to the next one is a line segment.
Lizarb's national soccer team observed that for some locations of kickers the two-ball game is possible but for some others it is impossible. The figure below shows two example locations: to the left, playing two-ball game is impossible; to the right, playing the game is possible.

Your task is to write a program that checks if for given player locations the two-ball game is possible or not.
Input Format
Each input starts with a single integer that gives the number of cases that follow. The firsts line of each case contains the number of players _n_, with _4 followed by _n_ lines that describe the coordinates of the players. All coordinates are pairwise different and the points determined by the coordinates are _not_ collinear (recall, three or more points are said to be collinear if they lie on a single straight line). The first coordinate describes the location of _s $ _{1} $_ , the second the location of _t $ _{1} $_ , the third coordinate describes the location of _s $ _{2} $_ , and the fourth the location of _t $ _{2} $_ . The remaining coordinates describe positions of other players of the team._
Output Format
For each case, your algorithm has to output a line containing POSSIBLE if it is possible to play the game and IMPOSSIBLE, otherwise.