eolymp
bolt
Try our new interface for solving problems
Problems

Host Place

Host Place

Next week ACM ICPC \textbf{1/8} final contest is held in our university. There is branch of our university in each city. Alekber, Hidayet, Shehriyar and other our heroes are living in different cities (maybe some of them are living in the same city). Our coach -- Etibar wants to choose a good city for hosting this contest. All participants have to be there in time. From any given cell, all \textbf{8} adjacent cells are reachable in \textbf{1} unit of time, e.g. (\textbf{x}, \textbf{y}) can be reached from (\textbf{x}-\textbf{1}, \textbf{y}+\textbf{1}) in one unit of time. Could you help him? You are given \textbf{n} cities where participants are living (\textbf{x}, \textbf{y}). Your task to find which city can be appropriate. \InputFile First line contains the number of cities \textbf{n} (\textbf{n} ≤ \textbf{100000}). The following \textbf{n} lines contain the coordinates of each city. All coordinates are nonnegative integers and less than \textbf{10^9}. \OutputFile Your task is to find such city satisfy the conditions which is mentioned above. If there are more than one correct solution, print city which is coming first in input. Cities are numbered from \textbf{1}.
Time limit 0.5 seconds
Memory limit 64 MiB
Input example #1
5
0 0
1 1
2 2
0 2
2 0
Output example #1
2
Author Mahammad Valiyev
Source Local Contest #1 Qafqaz University by Mahammad Valiyev