Rex is a very lucky dog. His owner Stan is very dili- gent about taking him out for a walk in the park every day. Midway through these walks, Stan takes a break and ties Rex to a pole so he can sit down on a bench for a few minutes. Rex is also a very busy dog. When he is tied to this pole, he still likes to run around to look at var- ious curiosities. This often causes his leash to wrap around the pole quite a few times. Once Stan’s break is done, he calls Rex back to the bench and then un- ties his leash. Stan likes to pull the leash tight around the pole, and then see how many times the leash is wrapped around and in which direction. You will be given the description of the path that Rex follows when he is tied around the pole. For simplicity, this path will be given as a sequence of straight line segments. Remember that Rex always returns to Stan before being untied; this final segment is not explicitly included in the description. Input The first line of each test case contains a single integer n between 1 and 10,000 describing the number of line segments. The next line consists of two integers x, y which describe the location of the pole. Then n lines follow, where the i-th such line consists of two integers xi, yi between -10,000 and 10,000. This means that Rex starts at x1, y1 and visits the points in the following manner: after visiting a point xi, yi Rex immediately runs in a straight line to point xi+1, yi+1 for 1 ≤ i ≤ n − 1. Finally, after visiting the final point xn,yn, Rex runs in a straight line to the starting point x1,y1. Input is terminated by a line containing ‘0’ which should not be processed. Output For each test case you are to output a single line consisting of the number of times the leash winds around the pole after Rex’s run. Recall that the leash is pulled taught in the direction of Rex’s final position after he is done running and you may assume that no knots were formed in this process. If the number of times is k > 0, then output +k if the leash is wrapped counter-clockwise around the pole, or output −k if the leash is wrapped clockwise around the pole. If k = 0, then simply output 0. Finally, it may be that Rex actually ran into the pole during his run. If this happens, then you should simply output ‘Ouch!’ instead of a number. You can assume the pole is infinitesimally skinny which means that we say Rex runs into the pole if Rex occupies the position x,y at any time during the run. Sample Input 5 00
2/2 10 -3 1 2 -1 -1 1 -1 -1 4 1 -1 00 20 2 -2 0 -2 2 00 11 -1 -1 2 00 11 1 -1 0 Sample Output +2 -1 Ouch! 0