#Lutece0551. Symmetry

Symmetry

Migrated from Lutece 551 Symmetry

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

After taking a modern art class, Farmer John has become interested in finding geometric patterns in everything around his farm. He carefully plots the locations of his NN cows (2N1000(2 \leq N \leq 1000), each one occupying a distinct point in the 2D plane, and he wonders how many different lines of symmetry exist for this set of points. A line of symmetry, of course, is a line across which the points on both sides are mirror images of each-other.

Please help FJ answer this most pressing geometric question.

Input

  • Line 11: The single integer NN.
  • Lines 21+N2\cdots 1+N: Line i+1i+1 contains two space-separated integers representing the xx and yy coordinates of the ithi_{th} cow (10,000x,y10,000-10,000\leq x,y \leq 10,000).

Output

  • Line 11: The number of different lines of symmetry of the point set.

Samples

4
0 0
0 1
1 0
1 1
4

Note

There are 4 lines of symmetry -- one vertical, one horizontal, and two diagonal.

Resources

USACO Feb 2012