output_description: Print the answer.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
      x_1 y_1
      x_2 y_2
      :
      x_N y_N
attempt: N = int(input())
  
  x = []
  y = []
  
  """
  minX = 1100000000
  minX_id = -1
  maxX = 0
  maxX_id = -1
  
  minY = 1100000000
  minY_id = -1
  maxY = 0
  maxY_id = -1
  """
  
  for _ in range(N):
      X, Y = map(int, input().split())
      x.append(X)
      y.append(Y)
  
  minX = min(x)
  maxX = max(x)
  minY = min(y)
  maxY = max(y)
  
  minX_id = [i for i, v in enumerate(x) if v == minX]
  maxX_id = [i for i, v in enumerate(x) if v == maxX]
  minY_id = [i for i, v in enumerate(y) if v == minY]
  maxY_id = [i for i, v in enumerate(y) if v == maxY]
  
  """
  print(minX_id)
  print(maxX_id)
  print(minY_id)
  print(maxY_id)
  """
  
  cand = 0
  
  for idx in minX_id:
      for IDX in maxX_id:
  
          cand = max(cand, maxX - minX + abs(y[IDX] - y[idx]))
  
  for idy in minY_id:
      for IDY in maxY_id:
  
          cand = max(cand, abs(x[IDY] - x[idy]) + maxY - minY)
  
  print(cand)
  
problem_description: Statement
  
  There are N points on the 2D plane, i-th of which is located on (x_i, y_i).
  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 (x_i, y_i) and (x_j, y_j) is
  defined by |x_i-x_j| + |y_i-y_j|.
samples: [{"input": "3\n    1 1\n    2 4\n    3 2", "output": "4\n    \n\nThe Manhattan distance between the first point and the second point is\n|1-2|+|1-4|=4, which is maximum possible.\n\n* * *"}, {"input": "2\n    1 1\n    1 1", "output": "0"}]