## Problem Description

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 input contains several test cases. The very first line contains the number of cases $t (t \leq 15)$ that follow. Each test cases begin with the number of Cash Machines $n (2 \leq n \leq 10^5)$. Each of the next n lines contain the coordinates of one Cash Machine $x,y (0 \leq x,y \leq 10^9)$ separated by a space.
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 neighbour.

## Source

Central European Programming Contest 2008

KdTree的模板题