Given a set of points with integer coordinates x_{i}, y_{i}, i = 1… N,
your program must find all the squares having each of four vertices in one of these points.

Input file format

Input file contains integer N followed by N pairs of integers x_{i}y_{i}.

Output file format

Output file must contain a single integer — number of squares found.

Constraints

− 10^{4} ≤ x_{i}, y_{i} ≤ 10^{4}, 1 ≤ N ≤ 2000.
All points in the input are different.