Eric has been challenged by his friends to yet another round of WhenTaken, the popular game where players guess when and where a picture was taken.
The Amplitude group has gotten so good at WhenTaken that they always get the year correct, so now they are refining
their ability to guess the location that a picture was taken. Pictures can be taken in at any lattice point in the
Eric remembers every location that was guessed as well as the location of every picture in the last round of WhenTaken, but he does not remember which guess was for which picture. He wants to know the minimum and maximum number of penalty points that the group could have gotten.
Constraints
Input Specification
The first line of input contains a single integer,
The next
The next
Output Specification
Output two integers, the minimum possible number of penalty points and the maximum possible number of penalty points.
Sample Input 1
2
0 0
1 1
0 0
1 1
Sample Output 1
0 4
Sample Explanation 1
If both guesses were correct, then the group got
Sample Input 2
3
724 200
-649 334
549 -654
117 39
-43 -913
833 -342
Sample Output 2
1396971 5147231
Comments