atcoder#ABC215F. [ABC215F] Dist Max 2
[ABC215F] Dist Max 2
Score : points
Problem Statement
Given are distinct points in a two-dimensional plane. Point has the coordinates .
Let us define the distance between two points and be : the smaller of the difference in the -coordinates and the difference in the -coordinates.
Find the maximum distance between two different points.
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the maximum distance between two different points.
3
0 3
3 1
4 10
4
The distances between Points and , between Points and , and between Points and are , , and , respectively, so your output should be .
4
0 1
0 4
0 10
0 6
0
8
897 729
802 969
765 184
992 887
1 104
521 641
220 909
380 378
801