The GruPro (Grupo de Programaçao da UFBA) wants to install a new drinking fountain on the Ondina campus, somewhere among the wooded paths between the Instituto de Computação and the Restaurante Universitário.
The campus map is an integer grid. There are $$$N$$$ benches, and the $$$i$$$-th bench sits at integer coordinates $$$(x_i, y_i)$$$. To be fair to everyone, the students decided the fountain must be placed exactly halfway between two benches: that is, at the midpoint of some pair of distinct benches $$$i$$$ and $$$j$$$, $$$$$$\left( \frac{x_i + x_j}{2},\ \frac{y_i + y_j}{2} \right). $$$$$$
Underground pipes can only reach points with integer coordinates, so the chosen midpoint must land exactly on a grid point.
Help the GruPro pick two benches whose midpoint is a valid spot for the fountain, or tell them it is impossible.
The first line contains a single integer $$$N$$$ ($$$2 \leq N \leq 10^{5}$$$), the number of benches.
Each of the next $$$N$$$ lines contains two integers $$$x_i$$$ and $$$y_i$$$ ($$$-10^{6} \leq x_i, y_i \leq 10^{6}$$$), the coordinates of the $$$i$$$-th bench. No two benches share the same position.
If there is a pair of distinct benches whose midpoint has integer coordinates, print two integers $$$i$$$ and $$$j$$$ ($$$1 \leq i, j \leq N$$$, $$$i \neq j$$$): the indices of two such benches. If several pairs work, print any of them.
If no such pair exists, print a single integer $$$-1$$$.
40 01 02 14 2
1 4
30 01 00 1
-1
Explanation for example 1
Benches $$$1$$$ and $$$4$$$ are at $$$(0,0)$$$ and $$$(4,2)$$$. Their midpoint is $$$(2,1)$$$, which has integer coordinates, so the fountain can be placed there. Benches $$$1$$$ and $$$3$$$ would also work; any valid pair is accepted.
Explanation for example 2
Checking the three possible pairs, every midpoint has at least one half-integer coordinate. For example, the midpoint of benches $$$1$$$ and $$$2$$$ is $$$(0.5,\ 0)$$$. Since no pair gives an integer point, the answer is $$$-1$$$.