In case of failure
To help their clients deal with faulty Cash Machines, the board of The Planar Bank has decided to stick a label expressing sincere regret and sorrow of the bank about the failure on every ATM. The very same label would gently ask the customer to calmly head to the nearest Machine (that should hopefully work fine).
In order to do so, a list of two-dimensional locations of all n ATMs has been prepared, and your task is to find for each of them the one closest with respect to the Euclidean distance.
Input
The first line contains the number of tests cases t (t ≤ 15). Each test case begin with the number of Cash Machines n (2 ≤ n ≤ 10^5). Each of the next n lines contains the coordinates of one Cash Machine x and y (0 ≤ x, y ≤ 10^9
). No two points in one test case will coincide.
Output
For each test case output n lines. i-th of them should contain the squared distance between the i-th ATM from the input and its nearest neighbor.