#IITKWPCC. Count right angle triangles

Count right angle triangles

    You are given n points in a 2D plane. You are asked these an inherently simple questions about them.

    You  have to find out number of right angle triangles (having base and height parrallel to axis) with the property that length of base and height is same.

Input

First Line will n: number of points. (n <= 10^5).

For next n lines  each line will contain two integers x and y.  (-10^8 <= x, y <= 10^8). 

Output

You have to output a single line containing the answer to question.

Example

Input:
5
0 0
1 0
2 0
0 1
0 2

Output:
2