Roger is organizing the Don Mills Programming Gala! He has assembled loyal assistants who will help him run this event.
Each of them lives in a house placed at some lattice point in the plane. Due to zoning requirements, no two houses can have Manhattan distance 1 from each other.
Roger wants everyone to meet up to discuss final logistics for the DMPG. He wishes to find an optimal lattice point for everyone to meet up, and he will do this by minimizing the sum of the Manhattan distances that everyone has to walk to attend the meetup. To respect the privacy of his assistants, he will not permit the meeting location to be someone's house.
Constraints
All are distinct.
Input Specification
The first line will contain a single integer .
Each of the next lines will contain two integers, a lattice point indicating that one of Roger's assistants lives at that location.
Output Specification
Output two space-separated integers. The first one is the minimum sum of Manhattan distances. The second one is the number of valid lattice points that attain this desired sum.
Sample Input
4
1 -3
0 1
-2 1
1 -1
Sample Output
10 4
Comments