#### Registered Users Only

Please login to utilize this feature.

Do note that this website only supports submissions in C++.

Problem 2: Symmetry [Brian Dean, 2012] 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 N cows (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. Please help FJ answer this most pressing geometric question. PROBLEM NAME: symmetry INPUT FORMAT: * Line 1: The single integer N. * Lines 2..1+N: Line i+1 contains two space-separated integers representing the x and y coordinates of the ith cow (-10,000 <= x,y <= 10,000). SAMPLE INPUT (file symmetry.in): 4 0 0 0 1 1 0 1 1 INPUT DETAILS: The 4 cows form the corners of a square. OUTPUT FORMAT: * Line 1: The number of different lines of symmetry of the point set. SAMPLE OUTPUT (file symmetry.out): 4 OUTPUT DETAILS: There are 4 lines of symmetry -- one vertical, one horizontal, and two diagonal.

### Tags

### Subtasks and Limits

Subtask | Score | #TC | Time | Memory | Scoring |
---|---|---|---|---|---|

1 | 100 | 15 | 1s | 16MB | Average |

### Judge Compile Command

g++-7 ans.cpp -o symmetry -Wall -static -O2 -lm -m64 -s -w -std=gnu++17 -fmax-errors=512