Years have passed. Generations have changed. New students play the triangle game at all universities. But Dima and Sasha have been unlucky so many times that they still play this strange game.
Dima has a map of Yekaterinozavodsk on his table, and three strategic points are marked on the map: (x_{1}, y_{1}) is the Yekaterinozavodsk State University, (x_{2}, y_{2}) is the sushi bar Karelskaya Gornitsa, and (x_{3}, y_{3}) is the T34 entertainment center, where Dima and Sasha play Russian billiards. These points and the segments that connect them form a nondegenerate triangle, and an equal triangular chip is cut out from a cardboard sheet. The goal of the players is to transfer the chip in several moves to the marked triangle. Each move consists in applying symmetry with
respect to some axis to the chip. You may assume that during the game the chip always remains within the bounds of the map. Sasha wants to determine the minimal number of moves needed for finishing the game.
Input
The first line contains the integers x_{1}, y_{1}, x_{2}, y_{2}, x_{3}, y_{3}. The second line contains the current coordinates of the chip: X_{1},
Y_{1}, X_{2}, Y_{2}, X_{3}, Y_{3}. The absolute values of all numbers do not exceed 2000.
Output
If it is impossible to move the chip so that it would coincide with the triangle, output “IMPOSSIBLE”. Otherwise, output the minimal possible number of moves in which this can be done.
Sample
input  output 

4 0 6 3 7 0
0 0 2 3 3 0
 2

Notes
In the sample, the first symmetry applied to the chip can be the symmetry with respect to the line x = 2, and the second, with respect to the line x = 4.
Problem Author: Alexander Ipatov
Problem Source: XIII Open USU Championship