SP19991 FAILURE - In case of failure

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 Format

The input contains several test cases. The very first line contains the number of cases t (t x, y 10 $ ^{9} $ ) separated by a space. No two points in one test case will coincide.

Output Format

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.