Given $n$ integer points $(x_i, y_i)$ on a plane, projecting these $n$ points onto a line $l$ forms a multiset $E_l$ of $n$ points. A line $l$ passing through the origin is called "good" if there exists a point $P$ on the line such that $E_l$ is symmetric with respect to $P$.
A multiset of points on a line is symmetric with respect to $P$ if, after removing any points that coincide with $P$, the remaining points can be paired such that each pair is symmetric with respect to $P$.
Find the number of "good" lines.
Note that there may be infinitely many such lines, in which case you should output $-1$.
Input
The first line contains an integer $n$, representing the number of points.
The next $n$ lines each contain two integers $x_i, y_i$, representing the coordinates of the $i$-th point.
$1 \leq n \leq 2\,000$, $|x_i|, |y_i| \leq 10^6$. The data may contain coincident points.
Output
Output a single integer representing the number of "good" lines. If there are infinitely many, output $-1$.
Examples
Input 1
3
1 3
2 1
3 3
Output 1
3
Input 2
6
88 -27
115 34
-147 -298
-106 -229
-9 -128
212 135
Output 2
5
Input 3
2
6666 -2333
2333 6666
Output 3
-1
Subtasks
For subtask 1 ($10\%$), $n \leq 3$.
For subtask 2 ($20\%$), $n \leq 12$.
For subtask 3 ($20\%$), special property 1 is satisfied.
For subtask 4 ($50\%$), no special properties.
Special property 1: $n \geq 100$, there are at most 10 points outside the $y$-axis, then some distinct points are placed randomly on the positive $y$-axis, and their symmetric points with respect to the origin are placed on the negative $y$-axis.
For $100\%$ of the data, $1 \leq n \leq 2\,000$, $|x_i|, |y_i| \leq 10^6$. The data may contain coincident points.