Given a set of points with integer coordinates xi,yi, 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 xiyi.
Output file format
Output file must contain a single integer — number of squares found.
Constraints
−104≤xi,yi≤104, 1≤N≤2000.
All points in the input are different.