n = gets.chomp.to_i
arr = n.times.map{gets.chomp.split(" ").map(&:to_i)}

min = 10 ** 9 + 10 ** 9 + 1
max = 0
arr.each do |(x, y)|
  tmp = x + y
  min = tmp if tmp < min
  max = tmp if tmp > max
end

puts max - min
