The input contains several test cases, and each test case is given in the following format:
The first line contains an integer n (0 < n <= 5), indicating the number of enemy units in the game.
The second line are two integers (x0,y0) representing the position where POM stands.
The third line gives a vector (dx,dy) describing the flying direction of the arrow.
Then n lines follows, each describing an enemy unit. An enemy unit can be considered as a convex polygon and the polygon is given in the following format in a line:
m x1 y1 x2 y2…xm ym
m is the number of vertices(m <= 10), and (x1,y1)…(xm,ym) are the vertices coordinates of the polygon, given in counter-clockwise order.
The first enemy unit is the POM’s target.
The input ends with a zero in a separate line (n=0). All input numbers are integers that do not exceed 105 in magnitude. It is guaranteed that polygons do not contact or overlap, and the point (x0,y0) isn’t inside (or on) any polygons.