Triangles
Easy
Execution time limit is 0.1 seconds
Runtime memory usage limit is 64 megabytes
n points are given on the plane with integer coordinates. No three points lie on one line. Find k - the number of triangles with vertices in these points and integer area.
Input
The first line contains number n. Next n lines contain the pairs of integers - the points coordinates (x_i, y_i). It is known that 0 < n, |x_i|,|y_i| ≤ 5000. Output
The value of k.
Examples
Input #1
Answer #1
Submissions 694
Acceptance rate 25%