시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB64375.000%

문제

After taking an Ancient Irish History class, Diarmuid has become interested in finding geometric patterns in neolithic tomb locations around Ireland. He carefully plots the locations of N tombs (2 ≤ N ≤ 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.

Help Diarmuid answer this most pressing geometric question.

입력

First line: The number of tombs N.

The following N lines: Two integers x, y separated by a space indicating the position x and y of each tomb (-­10,000 ≤ x,y ≤ 10,000).

출력

The number of different lines of symmetry of the point set.

예제 입력 1

3
0 0
0 1
0 3

예제 출력 1

1

예제 입력 2

4
0 0
0 1
1 0
1 1

예제 출력 2

4