- Time limit: 1.00 s
- Memory limit: 512 MB
A set is initially empty and points are added to it. Calculate the maximum Manhattan distance of two points after each addition.
Input
The first line has an integer : the number of points.
The following lines describe the points. Each line has two integers and . You can assume that each point is distinct.
Output
After each addition, print the maximum distance.
Constraints
Example
Input:
5 1 1 3 2 2 4 2 1 4 5
Output:
0 3 4 4 7