A group of kids is playing hide and seek in a playground. Each kid is either a hiding kid or a seeking kid. A hiding kid only tries not to be found, while a seeking kid tries to find other kids, both the hiding ones and the seeking ones.
Hiding kids and seeking kids alike would rather not be found, so they keep the walls of the playground between themselves and everyone else. Each wall is a line segment and each kid is a point in the XY plane. Two kids see each other exactly when the segment joining them crosses no wall segment.
For every seeking kid, count how many other kids that kid can see. To keep the problem simple, assume two things. No two walls meet, not even at their endpoints. And no three points are collinear in the set of all kid positions together with all wall endpoints, so no kid stands on a wall and no two kids share a position.
The first line contains three integers S, K and W: the number of seeking kids, the total number of kids, and the number of walls in the playground (1≤S≤10, 1≤K,W≤104, S≤K).
Each of the next K lines contains two integers X and Y (−106≤X,Y≤106), meaning that this kid stands at the point (X,Y) of the XY plane. The first S of these lines describe the seeking kids.
Each of the next W lines contains four integers X1, Y1, X2 and Y2 (−106≤X1,Y1,X2,Y2≤106), meaning that this wall has endpoints (X1,Y1) and (X2,Y2). Wall segments never intersect, and no three of the given points are collinear.
Print S lines. On the i-th line print the number of other kids that the i-th seeking kid can see.