Points#1486

Points

1 second
64 megabytes
Medium

On the plane, distinct points are given. Find the number of ways to choose three of them such that the area of the triangle with vertices at those points is an integer. It is assumed that even if three points lie on the same straight line, they form a triangle.

Input

The first line contains the integer (1 \leq N \leq 10000). The following lines contain pairs of non-negative integers, defining the coordinates of the points. All coordinates do not exceed .

Output

Output a single integer — the required number of triples of points.

Examples

Example 1

Loading
Loading