Midpoint
Time limit10sMemory limit256 MB
Count the triples (i, j, k) from three collinear point sets in which C_k is the midpoint of A_i and B_j.
Problem
You found points on the coordinate plane and named them , , . Two or more of the points can sit at the same coordinate. The names follow these properties:
- lie on a single straight line.
- lie on a single straight line.
- lie on a single straight line.
Count the triples such that is the midpoint of and .
Input
The first line contains three space separated positive integers , , and (). The next lines describe . The -th of them contains two space separated integers, the coordinate and the coordinate of . The next lines describe in the same format, and the lines after that describe . The absolute value of every coordinate is at most .
Output
Print the number of triples that satisfy the condition.