You are given N points on a 2D plane. Let the coordinates of point i be (xi,yi).
For two points i and j, define the distance as
dist(i,j)=(xj−xi)2+(yj−yi)2
that is, the squared Euclidean distance between the two points.
For each point i, find and print the minimum distance to any other point:
min1≤j≤N, j=idist(i,j)
The input consists of several test cases.
The first line contains the number of test cases T (1≤T≤15).
For each test case, the first line contains the number of points N (2≤N≤105). Each of the following N lines contains the coordinates xi and yi (0≤xi,yi≤109) of a point, separated by a space.
For each test case, print N lines.
The i-th line must contain the value of min1≤j≤N, j=idist(i,j) for point i.
Two distinct points may share the same location; in that case the value is 0.