On 5 April 2018, CMSA organized a party called 52Hz dancing party in Hotel ICON. In that party, you can enjoy the western food offered by the hotel and some students may
However, at about 9.30 pm, the electric service broke down and the stage became dark at that moment. Participants are worried but not panic. They moved in the dark and tried to prevent collisions.
One minute later, the electric resumed and the remaining participants in the stage would automatically join a game called 'Find Pairs'.
The closest pair of a boy and a girl will be celebrated by all other participants hoped that they may dance together. You know, only a pair only contains 2 persons with different genders.
Now, the stage can be regarded as a rectangle. There are exact girls and boys. The position of each paticipant is expressed by a pair of integers . Please find the distance between the closest pair. Here we use Euclidean distance to measure it. In other words, the distance between position and is .
To prevent from floating errors, you only need to output the square of distance.
输入格式
The input contains a single test case.
The first line, a number , the number of boys and girls.
The following lines, each line has two integers, indicating the position of boys.
The following lines, each line has two integers, indicating the position of girls.
输出格式
Output only one line, the square of the distance of the closest pair.