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 -plane as long as the absolute value of both the and coordinate is at most . If a picture was taken at point and the group guesses that it was taken at point , then the group gets penalty points.
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 lines of input each contain two integers, and , indicating that some picture was taken at .
The next lines of input each contain two integers, and , indicating that the group guessed some picture was taken at .
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 penalty points. However, if both guesses were incorrect, then the group got penalty points.
Sample Input 2
3
724 200
-649 334
549 -654
117 39
-43 -913
833 -342
Sample Output 2
1396971 5147231
Comments