Points in the Half-Plane
There are N points on a plane, uniformly distributed within the square defined by [0..C]×[0..C].
Your task is to determine how many of these points lie within a specified half-plane for each query.
Input
You are given the number of points N (1 ≤ N ≤ 5·10^4), the number of queries M (1 ≤ M ≤ 5·10^4), and the constant C (an integer from 1 to 10^4). Following this, you will receive N points, each with integer coordinates (X, Y). After that, you will receive M half-planes, each defined by the integers (a, b, c). The integers a, b, and c have absolute values not exceeding 10^4, and it is guaranteed that a^{2 }+ b^{2 }≠ 0. A point is considered to be in the half-plane if and only if ax + by + c ≥ 0.
Output
For each of the M queries, output a single integer representing the number of points that lie within the specified half-plane.