Dist Max SOLUTION
There are N points on the 2D plane, i-th of which is located on (xi,yi). There can be multiple points that share the same coordinate. What is the maximum possible Manhattan distance between two distinct points?
Here, the Manhattan distance between two points (xi,yi) and (xj,yj) is defined by |xi−xj|+|yi−yj|.
All values in input are integers.
Input is given from Standard Input in the following format: N
Print the answer.
Sample Input 1
Sample Output 1
The Manhattan distance between the first point and the second point is
|1−2|+|1−4|=4, which is maximum possible.
Sample Input 2
Sample Output 2