Christmas day is coming . There will be a ball in Christmas Eve . N men and N women will take part in the ball . One man and one woman form a pair . As we know , if there is a great difference in age or in height , the pair will be very disappointed . Now we define the disappointment between one man and one woman as :
difference[i][j]=(Hman[i] - Hwoman[j]) * (Hman[i] - Hwoman[j]) + (Aman[i] - Awoman[j]) * (Aman[i] - Awoman[j])
Input may contain several test data sets.
For each data set , the first line contains an integer N ( 0 < N <= 500 ) ;
The first line is followed by 2N lines . The first N lines describe N men , and the last N lines describe N women . Each line contains two integers , the height and the age of a person .
You can assume that the height of one person is between 100cm and 200cm and the age between 10 and 60 .
Input is ended by N = 0 , which should not be processed.
For each data set , print the answer in a single line.