Little Bang Experiment
Time Limit: 1 Second Memory Limit: 131072 KB
In the “Little Bang” experiment there are two squares of the same size which have intersection in two points as shown in figure 1.
This intersection always happens at the top-right corner of the first square and the bottom-left corner of the second square with integer coordinates. This experiment starts with placing two particles, first one on an arbitrary vertex of the first square and second one on an arbitrary vertex of the second square. Particles start moving clock-wise with the same speed (1 unit per second) on the edges of their own square. Write a program to get information of the experiment and indicates whether the moving particles have collision in their movement or not.
Input
First line of the input contains an integer N which is number of test cases. For each test case, there is a line containing 5 space separated integers s, x1, y 1 , x2, y 2 denoting size of the squares, and bottom-left coordinates of the first and the second squares as shown in figure 1, where 2 <= s <= 1000, 0 <= x 1, y1 <= 1000, x1 < x 2 < x1 + s and y1 < y 2 < y1 + s.
Output
For each test case, print “Little Bang!” if collision is possible, otherwise print “Impossible”.
Sample Input
2 4 0 0 2 2 4 0 0 1 1
Sample Output
Little Bang! ImpossibleSubmit