There are $n$ points on the plane, $(x_1,y_1), (x_2,y_2), \ldots, (x_n,y_n)$.

You need to place an isosceles triangle with two sides on the coordinate axis to cover all points (a point is covered if it lies inside the triangle or on the side of the triangle). Calculate the minimum length of the shorter side of the triangle.


-----Input-----

First line contains one integer $n$ ($1 \leq n \leq 10^5$).

Each of the next $n$ lines contains two integers $x_i$ and $y_i$ ($1 \leq x_i,y_i \leq 10^9$).


-----Output-----

Print the minimum length of the shorter side of the triangle. It can be proved that it's always an integer.


-----Examples-----
Input
3
1 1
1 2
2 1

Output
3
Input
4
1 1
1 2
2 1
2 2

Output
4


-----Note-----

Illustration for the first example: [Image]

Illustration for the second example: [Image]

Difficulty: EASY

Solutions:
n = int(input())
a = []
for _ in range(n):
	a.append(sum(list(map(int, input().split(' ')))))
print(max(a))


n = int(input())
s = 0
m = 0
for i in range(n):
	a = [int(i) for i in input().split()]
	s = sum(a)
	if s >= m:
		m = s
print(m)


n = int(input())
s = 0
for point in range(n):
	r = [int(x) for x in input().split(' ')]
	s = max(s, sum(r))
print(s)


def main():
	inte = int(input(''))
	n = inte
	maxi = 0
	while n > 0:
		lista = input('').split()
		a = int(lista[0])
		b = int(lista[1])
		if a + b > maxi:
			maxi = a + b
		n -= 1
	print(maxi)
main()


n = int(input())
ptlist = []
while n > 0:
	xy = input().split()
	for i in range(len(xy)):
		xy[i] = int(xy[i])
	ptlist.append(xy)
	n -= 1
maxsum = 0
for points in ptlist:
	if points[0] + points[1] > maxsum:
		maxsum = points[0] + points[1]
print(maxsum)


import os
import sys
n = int(sys.stdin.readline())
res = 0
for _ in range(n):
	(x, y) = [int(s) for s in sys.stdin.readline().split()]
	if x + y > res:
		res = x + y
sys.stdout.write('{0}'.format(res))


n = int(input())
m = 0
mx = 0
my = 0
for __ in range(n):
	(x, y) = map(int, input().split())
	if x + y > m:
		mx = x
		my = y
		m = x + y
print(mx + my)


m = 0
for _ in range(int(input())):
	m = max(sum(map(int, input().split())), m)
print(m)


n = int(input())
ps = [list(map(int, input().split())) for _ in range(n)]
print(max([sum(p) for p in ps]))


import math
import bisect
from math import gcd, floor, sqrt, log
from collections import defaultdict as dd
from bisect import bisect_left as bl, bisect_right as br
inp = lambda : int(input())
strng = lambda : input().strip()
jn = lambda x, l: x.join(map(str, l))
strl = lambda : list(input().strip())
mul = lambda : map(int, input().strip().split())
mulf = lambda : map(float, input().strip().split())
seq = lambda : list(map(int, input().strip().split()))

def mex(arr):
	nList = set(arr)
	mex = 0
	while mex in nList:
		mex += 1
	return mex

def results(arr):
	max_ = set(map(lambda x: sum(x), arr))
	max_ = max(max_)
	return max_

def main():
	t = inp()
	temp = []
	for _ in range(t):
		temp.append(seq())
	print(results(temp))
main()


n = int(input())
res = 0
for _ in range(n):
	(x, y) = map(int, input().split())
	res = max(res, x + y)
print(res)


n = int(input())
mx = 0
for i in range(n):
	s = input().split()
	(x, y) = (int(s[0]), int(s[1]))
	c = y + x
	if c > mx:
		mx = c
print(mx)


n = int(input())
l = 0
for i in range(n):
	(x, y) = map(int, input().split())
	if x + y > l:
		l = x + y
print(l)


n = int(input())
points = []
max_xy = 0
for _ in range(n):
	(x, y) = [int(_) for _ in input().strip().split()]
	max_xy = max(max_xy, x + y)
print(max_xy)


def cover():
	n = int(input())
	store = []
	chal = 0
	for i in range(n):
		temp = input().split()
		cur = int(temp[0]) + int(temp[1])
		if chal < cur:
			chal = cur
	print(chal)
cover()


n = int(input())
ma = -10 ** 9
for i in range(n):
	(x, y) = map(int, input().split())
	ma = max(ma, x + y)
print(ma)


n = int(input())
d = {}
for i in range(n):
	(a, b) = map(int, input().split())
	if a in d:
		if b > d[a]:
			d[a] = b
		else:
			pass
	else:
		d[a] = b
max = 0
for key in d:
	if d[key] + key > max:
		max = d[key] + key
		x = key
		y = d[key]
	else:
		pass
print(max)


a = int(input())
lista = []
for z in range(a):
	(b, c) = map(int, input().split())
	lista.append(b + c)
print(max(lista))


from sys import stdin
a = int(stdin.readline())
MAX = 0
for k in range(0, a):
	A = stdin.readline().split()
	P = int(A[0])
	Q = int(A[1])
	if P + Q > MAX:
		MAX = P + Q
print(MAX)


n = int(input())
longest = 0
points = ()
for i in range(n):
	(n, k) = list(map(int, input().split()))
	sq = n + k
	if sq > longest:
		longest = sq
print(longest)


L = int(input())
max_L = 0
for l in range(L):
	xy = list(map(int, input().split()))
	z = sum(xy)
	if z > max_L:
		max_L = z
print(max_L)


n = int(input())
max = 0
for i in range(n):
	(a, b) = map(int, input().split())
	if a + b > max:
		max = a + b
print(max)


from math import ceil
n = int(input())
l = []
m = 0
for i in range(n):
	(a, b) = map(int, input().split())
	m = max(m, a + b)
print(m)


ans = 0
for tc in range(int(input())):
	l = [int(i) for i in input().split()]
	ans = max(ans, sum(l))
print(ans)


n = int(input())
maxp = 0
for i in range(n):
	p = input().split()
	l = int(p[0]) + int(p[1])
	if l > maxp:
		maxp = l
print(maxp)


a = 0
for _ in range(int(input())):
	s = input().split()
	(x, y) = (int(s[0]), int(s[1]))
	if a <= x + y:
		a = x + y
print(a)


n = int(input())
L = [input().split() for k in range(n)]
L1 = [int(k[0]) + int(k[1]) for k in L]
print(max(L1))


n = int(input())
x = 0
for i in range(n):
	temp = tuple(map(lambda x: int(x), input().split(' ')))
	if sum(temp) > x:
		x = sum(temp)
		r = temp
print(sum(r))


n = int(input())
p = [tuple(map(int, input().split())) for _ in range(n)]
p.sort(key=lambda x: x[0] + x[1], reverse=True)
print(p[0][0] + p[0][1])


n = int(input())
tr = list()
for i in range(n):
	string = input().split()
	a = int(string[0])
	b = int(string[1])
	tr.append([a + b, a, b])
tr = sorted(tr, reverse=True)
x = tr[0][1]
y = tr[0][2]
if x > y:
	x += y
	y = 0
elif x <= y:
	y += x
	x = 0
print(max(x, y))


n = int(input())
sum = -1
for i in range(n):
	(m, n) = map(int, input().split())
	m = int(m)
	n = int(n)
	if m + n > sum:
		sum = m + n
print(sum)


n = int(input())
m = 0
for i in range(n):
	ls = [int(i) for i in input().split()]
	x = ls[0]
	y = ls[1]
	m = max(m, x + y)
print(m)


n = int(input())
s = 0
for _ in range(n):
	(a, b) = map(int, input().split())
	z = a + b
	if z > s:
		s = a + b
print(s)


n = int(input())
ans = 0
for _ in range(n):
	(x, y) = map(int, input().strip().split())
	if x + y > ans:
		ans = x + y
print(ans)


max = 0
sum = 0
for i in range(int(input())):
	(x, y) = map(int, input().split())
	nm = x + y
	if nm > max:
		max = nm
		sum = x + y
print(sum)


max_so_far = -1
for _ in range(int(input())):
	x = sum(map(int, input().split()))
	if max_so_far < x:
		max_so_far = x
print(max_so_far)


n = int(input())
m = 0
for i in range(n):
	[x, y] = list(map(int, input().split(' ')))
	m = max(m, x + y)
print(m)


n = int(input())
mx = -1
for i in range(n):
	(a, b) = map(int, input().split())
	mx = max(mx, a + b)
print(mx)


n = int(input())
d = []
maxx = -1
for i in range(n):
	(x, y) = map(int, input().strip().split())
	if maxx < x + y:
		maxx = x + y
print(maxx)


from collections import Counter
for _ in range(1):
	n = int(input())
	ans = 0
	for i in range(n):
		(u, v) = map(int, input().split())
		ans = max(ans, u + v)
	print(ans)


from sys import stdin, stdout
n = int(stdin.readline())
stdout.write(str(max([sum(map(int, line.split())) for line in stdin])))


import sys
import operator
std = sys.stdin
n = int(std.readline())
points = [[int(x) for x in std.readline().rstrip('\n').split()] for _ in range(n)]
print(sum(max(points, key=lambda x: x[0] + x[1])))


import math
n = int(input())
dots = []
for i in range(n):
	dots.append(sum(list(map(int, input().split()))))
print(max(dots))


n = int(input())
ANS = 0
for i in range(n):
	(x, y) = list(map(int, input().split()))
	if x + y > ANS:
		ANS = x + y
print(ANS)


x = int(input())
z = 0
for i in range(x):
	a = list(map(int, input().split()))
	t = a[0] + a[1]
	z = max(t, z)
t = 0
print(z)


import sys
n = int(sys.stdin.readline())
maxi = 0
for i in range(n):
	(x, y) = map(int, sys.stdin.readline().split())
	if x + y > maxi:
		maxi = x + y
print(maxi)


n = int(input())
r1_max = 0
r2_max = 0
for i in range(n):
	(x, y) = [int(s) for s in input().split()]
	r1 = x * y
	r2 = x * x + y * y
	if r1 >= r1_max:
		r1_max = r1
		x1_max = x
		y1_max = y
	if r2 >= r2_max:
		r2_max = r2
		x2_max = x
		y2_max = y
if x1_max + y1_max > x2_max + y2_max:
	print(x1_max + y1_max)
else:
	print(x2_max + y2_max)


import math
n = int(input())
m = 0
d = 0
x1 = 0
y1 = 0
while m < n:
	s = list(map(int, input().split()))
	x = s[0]
	y = s[1]
	p = x + y
	if p > d:
		d = p
		x1 = x
		y1 = y
	m = m + 1
print(x1 + y1)


n = int(input())
ans = 0
for i in range(n):
	t = list(map(int, input().split()))
	ans = max(ans, t[0] + t[1])
print(ans)


m = 0
for i in range(int(input())):
	s = sum(map(int, input().split()))
	m = max(s, m)
print(m)


n = int(input())
ls = []
for i in range(n):
	inp = input()
	(x, y) = inp.split(' ')
	ls.append(int(x) + int(y))
print(max(ls))


n = int(input())
ans = 0
for _ in range(n):
	(a, b) = map(int, input().split())
	ans = max(a + b, ans)
print(ans)


from sys import stdin, stdout
n = int(stdin.readline())
ans = 0
while n > 0:
	n -= 1
	(x, y) = [int(x) for x in stdin.readline().split()]
	ans = max(ans, x + y)
stdout.write(str(ans))


import math
t = int(input())
ma = 0
for i in range(t):
	(x, y) = map(int, input().split())
	dist = x + y
	ma = max(ma, dist)
print(ma)


n = int(input())
need = 0
for i in range(n):
	s = list(map(int, input().split()))
	if s[0] + s[1] > need:
		need = s[0] + s[1]
print(need)


n = int(input())
(x, y) = (0, 0)
s = 0
for _ in range(n):
	(a, b) = map(int, input().split())
	add = a + b
	if add >= s:
		s = add
		x = a
		y = b
c = x + y
print(c)


n = int(input())
l = []
for x in range(n):
	(p, k) = list(map(int, input().split()))
	l.append(p + k)
print(max(l))


n = int(input())
maxx = -1
for _ in range(n):
	p = list(map(int, input().split()))
	s = sum(p)
	if maxx < s:
		maxx = s
print(maxx)


res = 0
for i in range(int(input())):
	(x, y) = map(int, input().split())
	res = max(res, x + y)
print(res)


from __future__ import division, print_function
from sys import stdin, stdout
import itertools, os, sys, threading
from collections import deque, Counter, OrderedDict, defaultdict
import heapq
from math import ceil, floor, log, sqrt, factorial, pow, pi, gcd

def ii():
	return int(input())

def si():
	return str(input())

def mi():
	return map(int, input().split())

def li():
	return list(mi())

def fii():
	return int(stdin.readline())

def fsi():
	return str(stdin.readline())

def fmi():
	return map(int, stdin.readline().split())

def fli():
	return list(fmi())
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod = 1000000007
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def getKey(item):
	return item[0]

def sort2(l):
	return sorted(l, key=getKey)

def d2(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def ntl(n):
	return [int(i) for i in str(n)]

def powerMod(x, y, p):
	res = 1
	x %= p
	while y > 0:
		if y & 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
graph = defaultdict(list)
visited = [0] * 1000000
col = [-1] * 1000000

def dfs(v, c):
	if visited[v]:
		if col[v] != c:
			print('-1')
			exit()
		return
	col[v] = c
	visited[v] = 1
	for i in graph[v]:
		dfs(i, c ^ 1)

def bfs(d, v):
	q = []
	q.append(v)
	visited[v] = 1
	while len(q) != 0:
		x = q[0]
		q.pop(0)
		for i in d[x]:
			if visited[i] != 1:
				visited[i] = 1
				q.append(i)
		print(x)
	print(l)

def make_graph(e):
	d = {}
	for i in range(e):
		(x, y) = mi()
		if x not in d.keys():
			d[x] = [y]
		else:
			d[x].append(y)
		if y not in d.keys():
			d[y] = [x]
		else:
			d[y].append(x)
	return d

def gr2(n):
	d = {}
	for i in range(n):
		(x, y) = mi()
		if x not in d.keys():
			d[x] = [y]
		else:
			d[x].append(y)
	return d

def connected_components(graph):
	seen = set()

	def dfs(v):
		vs = set([v])
		component = []
		while vs:
			v = vs.pop()
			seen.add(v)
			vs |= set(graph[v]) - seen
			component.append(v)
		return component
	ans = []
	for v in graph:
		if v not in seen:
			d = dfs(v)
			ans.append(d)
	return ans

def distfromorigin(x, y):
	return pow(x * x + y * y, 0.5)
n = fii()
max = 0
for i in range(n):
	(x, y) = fmi()
	if x + y > max:
		max = x + y
print(max)


N = int(input().strip())
min_side_len = 0
for i in range(N):
	(x, y) = [int(x) for x in input().split()]
	current_sum = x + y
	if current_sum > min_side_len:
		min_side_len = current_sum
print(min_side_len)


line1 = input()
count = int(line1.strip())
lines = list()
for i in range(count):
	lines.append(input())
points = list()
for row in lines:
	vertex = row.split()
	x = int(vertex[0].strip())
	y = int(vertex[1].strip())
	points.append((x, y))
big = 0
for i in range(len(points)):
	val = points[i][0] + points[i][1]
	if val > big:
		x = points[i][0]
		y = points[i][1]
		big = val
print(big)


l = []
for i in range(int(input())):
	(x, y) = list(map(int, input().split()))
	l += [x + y]
print(max(l))


n = int(input())
A = [tuple(map(int, input().split())) for i in range(n)]
s = 0
for a in A:
	s = max(s, a[0] + a[1])
print(s)


m = -1
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	m = max(a + b, m)
print(m)


a = int(input())
b = []
for _ in range(a):
	(c, d) = map(int, input().split())
	b.append(c + d)
print(max(b))


num = int(input())
big = []
k = 1
koo = input().split()
maxim = int(koo[0]) + int(koo[1])
big.extend(koo)
while k < num:
	arr = input().split()
	if int(arr[0]) + int(arr[1]) >= maxim:
		maxim = int(arr[0]) + int(arr[1])
		big.extend(arr)
	k += 1
num1 = int(big[len(big) - 2])
num2 = int(big[len(big) - 1])
result = num2 + num1
print(result)


from math import *
from collections import *
import sys
sys.setrecursionlimit(10 ** 9)
n = int(input())
ans = 0
for i in range(n):
	(x, y) = map(int, input().split())
	ans = max(ans, x + y)
print(ans)


n = int(input())
k = set()
for i in range(n):
	(x, y) = map(int, input().split())
	k.add(x + y)
print(max(k))


n = int(input())
coords = []
for i in range(n):
	(x, y) = input().split()
	(x, y) = (int(x), int(y))
	coords.append((x, y))
coords = sorted(coords, key=lambda x: sum(x))
print(sum(coords[-1]))


max = 0
ans = 0
for _ in range(int(input())):
	(x, y) = map(int, input().split())
	dist = x + y
	if dist > ans:
		ans = dist
print(ans)


def main():
	n = int(input())
	m = 0
	for i in range(n):
		(a, b) = [int(v) for v in input().split()]
		m = max(a + b, m)
	print(m)
main()


def main():
	n = int(input())
	ans = 0
	for i in range(n):
		(x, y) = map(int, input().split(' '))
		ans = max(ans, x + y)
	print(ans)
exit(main())


e = 0
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	if a + b > e:
		e = a + b
print(e)


m = 0
for _ in range(int(input())):
	(l, r) = input().split()
	(l, r) = (int(l), int(r))
	m = max(m, l + r)
print(m)


A = []
T = int(input())
for i in range(T):
	A.append(sum([int(x) for x in input().split()]))
print(max(A))


def main():
	n = int(input())
	qs = []
	for _ in range(n):
		(a, b) = [int(c) for c in input().split()]
		qs.append(a + b)
	print(max(qs))
main()


n = int(input())
m = []
for i in range(n):
	(a, b) = map(int, input().split())
	m.append(a + b)
print(max(m))


print(max((sum(map(int, input().split())) for _ in range(int(input())))))


t = int(input())
lis = []
for i in range(t):
	inp = [int(j) for j in input().split()]
	(x, y) = (inp[0], inp[1])
	lis.append(x + y)
print(max(lis))


n = int(input())
arr2d = [[int(j) for j in input().split()] for i in range(n)]
max_distance = 0
for i in range(n):
	if arr2d[i][0] + arr2d[i][1] > max_distance:
		max_distance = arr2d[i][0] + arr2d[i][1]
print(max_distance)


sum = 0
for i in range(int(input())):
	(a, b) = map(int, input().split())
	if a + b > sum:
		sum = a + b
print(sum)


n = int(input())
z = 0
for i in range(n):
	(x, y) = input().split(' ')
	x = int(x)
	y = int(y)
	if x + y > z:
		z = x + y
		ans = x + y
print(ans)


n = int(input())
maxn = 0
for _ in range(n):
	maxn = max(maxn, sum(map(int, input().split())))
print(maxn)


n = int(input())
s = []
(c, r) = (0, 0)
for i in range(n):
	(a, b) = map(int, input().split())
	c = max(a + b, c)
print(c)


n = int(input())
c = 0
for i in range(n):
	(x, y) = map(int, input().split())
	c = max(c, x + y)
print(c)


n = int(input())
maxi = 0
for i in range(n):
	(first, second) = list(map(int, input().split()))
	maxi = max(maxi, first + second)
print(maxi)


n = int(input())
ans = 1
for _ in range(n):
	(x, y) = [int(r) for r in input().split()]
	ans = max(ans, x + y)
print(ans)


n = int(input())
x = 0
for i in range(n):
	m = input().split()
	y = int(m[0]) + int(m[1])
	if x < y:
		x = y
print(x)


from sys import stdin
from collections import deque
mod = 10 ** 9 + 7
from bisect import bisect_right
from bisect import bisect_left
from collections import defaultdict
from math import sqrt, factorial, gcd, log2, inf, ceil
n = int(input())
la = []
maxi = 0
for i in range(n):
	(a, b) = map(int, input().split())
	maxi = max(a + b, maxi)
print(maxi)


a = int(input())
l = []
for i in range(a):
	(m, n) = map(int, input().split())
	s = m + n
	l.append(s)
print(max(l))


import math as mt
import sys, string, bisect
input = sys.stdin.readline
from collections import deque, defaultdict
L = lambda : list(map(int, input().split()))
Ls = lambda : list(input().split())
M = lambda : map(int, input().split())
I = lambda : int(input())
n = I()
a = 0
for i in range(n):
	(c, d) = M()
	a = max(a, c + d)
print(a)


n = int(input())
maxx = -float('inf')
for i in range(n):
	xy = list(map(int, input().rstrip().split()))
	x = xy[0]
	y = xy[1]
	if x + y > maxx:
		maxx = x + y
print(maxx)


n = int(input())
s = 0
for i in range(n):
	(x, y) = map(int, input().split())
	s1 = x + y
	if s1 > s:
		s = s1
print(s)


n = int(input())
z = []
for i in range(n):
	(x, y) = map(int, input().split())
	z.append(x + y)
print(max(z))


n = int(input())
max = 0
for i in range(n):
	s = sum([int(e) for e in input().split()])
	if s > max:
		max = s
print(max)


maxV = 0
for _ in range(int(input())):
	(x, y) = map(int, input().split())
	if x + y > maxV:
		maxV = x + y
print(maxV)


n = int(input())
arr_x = []
arr_y = []
a = []
for i in range(n):
	arr = [int(a) for a in input().split()]
	a.append(arr[0] + arr[1])
print(max(a))


n = int(input())
i = 0
mx = 0
x = 0
y = 0
while i < n:
	(x, y) = input().split()
	(x, y) = (int(x), int(y))
	b = x + y
	if b > mx:
		mx = b
	i += 1
print(mx)


import math
import sys
DEBUG = False

def inp():
	return sys.stdin.readline().rstrip()

def dprint(*value, sep=' ', end='\n'):
	if DEBUG:
		print(*value, sep=sep, end=end)

def main():
	N = int(inp())
	ans = 0
	for _ in range(N):
		(x, y) = [int(e) for e in inp().split()]
		ans = max(ans, x + y)
	print(ans)
main()


n_cases = int(input())
points = []
for i in range(n_cases):
	points.append([int(x) for x in input().split()])
max_side = 0
for point in points:
	side = point[0] + point[1]
	if side > max_side:
		max_side = side
print(max_side)


n = int(input())
num = []
x1 = 10 ** 18
y1 = -10 ** 18
x2 = -1
y2 = 10 ** 18
ans = -1
for i in range(n):
	(a, b) = map(int, input().split())
	ans = max(ans, a + b)
print(ans)


n = int(input())
P = [list(map(int, input().split())) for i in range(n)]
ANS = 0
for i in range(n):
	ANS = max(ANS, P[i][0] + P[i][1])
print(ANS)


n = int(input())
a = []
for i in range(n):
	(x, y) = map(int, input().split())
	a.append(x + y)
a.sort()
print(a[n - 1])


n = int(input())
ans = 0
for i in range(n):
	(k1, k2) = map(int, input().split())
	s = k1 + k2
	ans = max(ans, s)
print(ans)


a = []
ml = 0
n = int(input())
for i in range(0, n):
	a += input().split()
for j in range(0, len(a), 2):
	if int(a[j]) + int(a[j + 1]) > ml:
		ml = int(a[j]) + int(a[j + 1])
print(ml)


f = lambda : map(int, input().split())
n = int(input())
x = 0
while n:
	(a, b) = f()
	x = max(a + b, x)
	n -= 1
print(x)


def find_isosceles_side_length(coordinates):
	largest_triangle = 0
	chosen_x = 0
	chosen_y = 0
	for coordinate in coordinates:
		x = coordinate['x']
		y = coordinate['y']
		hypotenuse = x + y
		if hypotenuse > largest_triangle:
			largest_triangle = hypotenuse
			(chosen_x, chosen_y) = (x, y)
	return chosen_x + chosen_y
triangles = int(input())
coordinates = []
for i in range(0, triangles):
	line = input().split()
	(x, y) = (int(x) for x in line)
	coordinates.append({'x': x, 'y': y})
print(find_isosceles_side_length(coordinates))


maxm = -1
for _ in range(int(input())):
	(x, y) = map(int, input().split())
	maxm = max(maxm, x + y)
print(maxm)


t = int(input().strip())
ans = 0
for i in range(t):
	(x, y) = list(map(int, input().strip().split()))
	ans = max(x + y, ans)
print(ans)


l = []
for i in range(int(input())):
	(x, y) = [int(g) for g in input().split()]
	l.append(x + y)
print(max(l))


n = int(input())
maxi = 0
for _ in range(n):
	(x, y) = map(int, input().split())
	if x + y > maxi:
		maxi = x + y
print(maxi)


MOD = 10 ** 9 + 7
I = lambda : list(map(int, input().split()))
(n,) = I()
l = []
s = 0
for i in range(n):
	s = max(s, sum(I()))
print(s)


print(max((sum((int(t) for t in input().split(' '))) for x in range(int(input())))))


n = int(input())
(max_x, max_y) = (0, 0)
sm = max_x + max_y
for i in range(n):
	(x, y) = map(int, input().split())
	if x + y > sm:
		sm = x + y
		max_x = x
		max_y = y
print(max_y + max_x)


n = int(input())
(xmin, ymin) = (float('-inf'), float('-inf'))
li = []
for _ in range(n):
	(a, b) = [int(x) for x in input().split()]
	li.append(a + b)
print(max(li))


n = int(input())
sum = -1
for i in range(n):
	(x, y) = map(int, input().split())
	sum = max(sum, x + y)
print(str(sum) + '\n')


x = int(input())
a = 0
g = []
for i in range(x):
	(p, q) = map(int, input().split())
	g.append(p + q)
print(max(g))


n = int(input())
l1 = []
for i in range(0, n):
	l = list(map(int, input().split(' ')))
	s = sum(l)
	l1.append(s)
print(max(l1))


t = int(input())
max = 0
for i in range(t):
	(x, y) = map(int, input().split())
	if max < x + y:
		max = x + y
print(max)


t = int(input())
c = []
for i in range(t):
	inp = list(map(int, input().split()))
	x = inp[0]
	y = inp[1]
	c.append(x + y)
print(max(c))


a = int(input())
mx = 0
b = []
for i in range(a):
	b = input().split()
	if int(b[0]) + int(b[1]) > mx:
		mx = int(b[0]) + int(b[1])
print(mx)


nums = []
for _ in range(int(input())):
	(x, y) = map(int, input().split())
	nums.append(x + y)
print(max(nums))


n = int(input())
l = []
while n:
	(a, b) = map(int, input().split())
	l.append(a + b)
	n -= 1
print(max(l))


def find_minimum_cathetus_length(coordinates):
	minimum_cathetus_length = 0
	for coordinate in coordinates:
		x = coordinate['x']
		y = coordinate['y']
		cathetus = x + y
		if cathetus > minimum_cathetus_length:
			minimum_cathetus_length = cathetus
	return minimum_cathetus_length
number_of_coordinates = int(input())
coordinates = []
for i in range(0, number_of_coordinates):
	(x, y) = (int(x) for x in input().split())
	coordinates.append({'x': x, 'y': y})
print(find_minimum_cathetus_length(coordinates))


n = int(input())
ans = 0
for i in range(n):
	ans = max(ans, sum(list(map(int, input().split()))))
print(ans)


from math import sqrt
n = int(input())
cords = []
for i in range(n):
	cords.append(list(map(int, input().split())))
for i in range(len(cords)):
	cords[i] = sum(cords[i])
print(max(cords))


n = int(input())
l = list()
for i in range(n):
	(x, y) = map(int, input().split())
	l.append(x + y)
l.sort(reverse=True)
print(l[0])


t = int(input())
array = []
while t:
	(a, b) = input().split()
	a = int(a)
	b = int(b)
	sum = a + b
	array.append(sum)
	t = t - 1
print(max(array))


n = int(input())
pmax = 0
for i in range(n):
	(x, y) = map(int, input().split())
	p = x + y
	if p > pmax:
		pmax = p
print(pmax)


n = int(input())
m = 0
while n > 0:
	(x, y) = map(int, input().split())
	r = x + y
	if m < r:
		m = r
	n = n - 1
print(m)


t = int(input())
max = 0
for _ in range(t):
	b = sum(list(map(int, input().split())))
	if b > max:
		max = b
print(max)


a = int(input())
l = []
for i in range(a):
	(x, y) = map(int, input().split())
	l.append(x + y)
print(max(l))


maxx = 0
for _ in range(int(input())):
	(x, y) = map(int, input().split())
	maxx = max(maxx, x + y)
print(maxx)


import math

def get_int_vector():
	return [int(x) for x in input().split()]
n = int(input())
result = -1
for _ in range(n):
	(x, y) = get_int_vector()
	result = max(result, x + y)
print(result)


import math
n = int(input())
a = 0
for _ in range(n):
	(x, y) = map(int, input().split())
	a = max(a, x + y)
print(a)


n = int(input())
res = 0
for _ in range(n):
	curr = sum(map(int, input().split()))
	if curr > res:
		res = curr
print(res)


a = int(input())
s = []
for i in range(a):
	(x, y) = map(int, input().split())
	d = x + y
	s.append(d)
print(max(s))


n = int(input())
X = []
Y = []
for i in range(n):
	(x, y) = [int(j) for j in input().split()]
	X.append(x)
	Y.append(y)
print(max([X[i] + Y[i] for i in range(n)]))


from math import ceil, sqrt, gcd

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().strip().split(' '))

def li():
	return list(mi())
x = 0
n = ii()
for i in range(n):
	(a, b) = mi()
	x = max(x, a + b)
print(x)


n = int(input())
res = 0
for i in range(n):
	res = max(res, sum(map(int, input().split())))
print(res)


from sys import stdin
n = int(stdin.readline())
max = 0
for _ in range(n):
	(x, y) = map(int, stdin.readline().split())
	if max < x + y:
		max = x + y
print(max)


n = int(input())
l = []
for _ in range(n):
	(a, b) = map(int, input().split())
	s = a + b
	l.append(s)
print(max(l))


max1 = 0
for _ in range(int(input())):
	(x, y) = [int(i) for i in input().split()]
	sum1 = x + y
	if max1 < sum1:
		max1 = sum1
print(max1)


n = int(input())
max_pt = None
for _ in range(n):
	s = input().split()
	pt = int(s[0]) + int(s[1])
	if max_pt == None or max_pt < pt:
		max_pt = pt
print(max_pt)


n = int(input())
temps = 0
for i in range(n):
	(x1, x2) = map(int, input().split())
	temp = x1 + x2
	if temp > temps:
		temps = temp
print(temps)


c = 0
for _ in range(int(input())):
	(a, b) = list(map(int, input().split()))
	if a + b > c:
		c = a + b
print(c)


n = int(input())
ans = -float('inf')
for _ in range(n):
	(x, y) = map(int, input().split())
	ans = max(ans, x + y)
print(ans)


n = int(input())
l = []
for i in range(n):
	y = sum(map(int, input().split()))
	l.append(y)
print(max(l))


n = int(input())
l1 = []
l2 = []
sum = []
for i in range(n):
	(a, b) = input().split()
	l1.append(int(a) + int(b))
print(max(l1))


n = int(input())
maxx = -1
for i in range(n):
	(a, b) = [int(i) for i in input().split()]
	if a + b > maxx:
		maxx = a + b
print(maxx)


n = int(input())
b = []
for i in range(n):
	b.append(list(map(int, input().split())))
a = []
for j in range(n):
	a.append(b[j][0] + b[j][1])
c = max(a)
print(c)


n = int(input())
sum_x_y = 0
(x_i, y_i) = (0, 0)
while n:
	[x, y] = list(map(int, input().split()))
	if x + y > sum_x_y:
		sum_x_y = x + y
		(x_i, y_i) = (x, y)
	n -= 1
print(sum_x_y)


n = int(input())
ans = 0
sq = 0
for i in range(n):
	(x, y) = map(int, input().split())
	if x + y > ans:
		ans = x + y
print(ans)


ps = [list(map(int, input().split())) for _ in range(int(input()))]
print(max([p[0] + p[1] for p in ps]))


import math, sys
from itertools import permutations

def mp():
	return list(map(int, input().split()))
debug = 0
if debug:
	file = open('input.txt', 'r')
	input = file.readline
else:
	input = sys.stdin.readline

def main():
	n = int(input())
	ans = 0
	for i in range(n):
		(a, b) = mp()
		ans = max(ans, a + b)
	print(ans)
main()


POINTS = int(input())
maxsum = 0
for i in range(POINTS):
	temp = sum(list(map(int, input().split())))
	if temp > maxsum:
		maxsum = temp
print(maxsum)


d = int(input())
verts = []
for i in range(d):
	d = [int(x) for x in input().split(' ')]
	verts.append(d)
maxx = 0
for v in verts:
	maxx = max(maxx, v[0] + v[1])
print(maxx)


t = int(input())
largest = 0
for i in range(t):
	temp = [int(x) for x in input().split()]
	x = temp[0]
	y = temp[1]
	if x + y > largest:
		largest = x + y
print(largest)


n = int(input())
p = 0
for i in range(n):
	(a, b) = [int(i) for i in input().split()]
	p = max(p, a + b)
print(p)


n = int(input())
x = 0
y = 0
s = 0
for i in range(n):
	(a, b) = map(int, input().split())
	if s <= a + b:
		s = a + b
		x = a
		y = b
print(x + y)


n = int(input())
p = []
l = ''
a = 0
for i in range(n):
	t = input()
	for line in t:
		if line == ' ':
			p.append(int(l))
			l = ''
		else:
			l += line
	p.append(int(l))
	l = ''
for i in range(n):
	if p[2 * i] + p[2 * i + 1] > a:
		a = p[2 * i] + p[2 * i + 1]
print(a)


n = int(input())
points = []
for i in range(n):
	points.append(sum(map(int, input().split())))
print(max(points))


MAX = 0
for _ in range(int(input())):
	(X, Y) = map(int, input().split())
	if X + Y >= MAX:
		MAX = X + Y
print(MAX)


cases = int(input())
mx = float('-inf')
while cases:
	cases -= 1
	(a, b) = map(int, input().split())
	mx = max(mx, a + b)
print(mx)


n = int(input())
ans = 0
for _ in range(n):
	(a, b) = input().split()
	(a, b) = [int(a), int(b)]
	c = a + b
	if ans < c:
		ans = c
print(ans)


P = []
Pmax = 0
i_all = int(input())
for i in range(i_all):
	[x, y] = input().split(' ')[:2]
	a = int(x) + int(y)
	if a > Pmax:
		Pmax = a
print(Pmax)


n = int(input())
max1 = 0
for i in range(n):
	(a, b) = map(int, input().strip().split())
	d = a + b
	max1 = max(d, max1)
print(max1)


n = int(input())
maxx = 0
for i in range(n):
	l = list(map(int, input().split()))
	if sum(l) > maxx:
		maxx = sum(l)
print(maxx)


def go():
	n = int(input())
	m = 0
	for i in range(n):
		(a, b) = [int(i) for i in input().split(' ')]
		m = max(a + b, m)
	return m
print(go())


a = []
for x in range(int(input())):
	(c, d) = map(int, input().split())
	a.append(c + d)
print(max(a))


n = int(input())
a = []
for i in range(n):
	(x, y) = [int(x) for x in input().split()]
	a.append(x + y)
print(max(a))


n = int(input())
maxi = 0
for i in range(n):
	temp = list(map(int, input().split()))
	if sum(temp) > maxi:
		maxi = sum(temp)
print(maxi)


n = int(input())
list = []
for i in range(n):
	(p, q) = map(int, input().split())
	list.append(p + q)
print(max(list))


n = int(input())
ans = 0
for i in range(n):
	(xi, yi) = map(int, input().split())
	ans = max(ans, xi + yi)
print(ans)


n = int(input())
r = 0
for _ in range(n):
	(x, y) = list(map(int, input().split()))
	if x + y > r:
		r = x + y
print(r)


t = int(input())
k = float('-inf')
for i in range(t):
	(x, y) = map(int, input().split())
	m = x + y
	k = max(m, k)
print(k)


n = int(input())
array = []
for _ in range(n):
	(x, y) = map(int, input().split())
	array.append(x + y)
print(max(array))


import sys
ip = int(sys.stdin.readline())
x = 0
for i in range(ip):
	(a, b) = map(int, sys.stdin.readline().split())
	x = max(x, a + b)
print(x)


n = int(input())
shortest = 2
for loop in range(n):
	(x, y) = map(int, input().split())
	side = x + y
	if side > shortest:
		shortest = side
print(shortest)


n = int(input())
(a, b) = map(int, input().split())
max = a + b
for i in range(n - 1):
	(c, d) = map(int, input().split())
	if c + d > max:
		max = c + d
print(max)


n = int(input())
xMin = 0
yMin = 0
for i in range(n):
	n = list(map(int, input().split()))
	if xMin + yMin < n[0] + n[1]:
		xMin = n[0]
		yMin = n[1]
print(xMin + yMin)


n = int(input())
x = []
y = []
valX = 0
iX = 0
valY = 0
iY = 0
res = 0
for i in range(n):
	(xi, yi) = map(int, input().split())
	x.append(xi)
	y.append(yi)
	res = max(res, xi + yi)
print(res)


print(max((sum(map(int, i.split())) for i in [*open(0)][1:])))


x = int(input())
maxs = -1
for i in range(x):
	(a, b) = map(int, input().split())
	maxs = max(maxs, a + b)
print(maxs)


n = int(input())
x = 0
y = 0
maxval = 0
for i in range(n):
	(u, v) = map(int, input().split())
	if maxval < u + v:
		maxval = u + v
		x = u
		y = v
print(x + y)


s = int(input())
su = 0
for i in range(0, s):
	a = list(map(int, input().split()))
	if sum(a) > su:
		su = sum(a)
print(su)


n = int(input())
maxx = 0 - 1
for i in range(n):
	(x, y) = [int(num) for num in input().split()]
	maxx = max(maxx, x + y)
print(maxx)


def f(n, arr):
	return max((a + b for (a, b) in arr))
n = int(input())
co = []
for _ in range(n):
	(x, y) = map(int, input().split())
	co.append((x, y))
print(f(n, co))


n = int(input())
ans = 0
for i in range(n):
	(a, b) = list(map(int, input().split()))
	ans = max(ans, a + b)
print(ans)


n = int(input())
maxim = -1
for i in range(0, n):
	(x, y) = map(int, input().split())
	if x + y > maxim:
		maxim = x + y
print(maxim)


n = int(input())
maxx = 0
for i in range(n):
	(x, y) = map(int, input().split())
	if x + y > maxx:
		maxx = x + y
print(round(maxx))


import sys
from collections import defaultdict as dd
from itertools import permutations as pp
from itertools import combinations as cc
from collections import Counter as ccd
from random import randint as rd
from bisect import bisect_left as bl
import heapq
mod = 10 ** 9 + 7

def ri(flag=0):
	if flag == 0:
		return [int(i) for i in input().split()]
	else:
		return int(input())
n = ri(1)
ans = 0
for i in range(n):
	(a, b) = ri()
	ans = max(a + b, ans)
print(ans)


n = int(input())
maxer = 0
for i in range(n):
	line = [int(i) for i in input().split()]
	t = line[0] + line[1]
	maxer = max(maxer, t)
print(maxer)


n = int(input())
Max = 0
for i in range(0, n):
	(k, j) = map(int, input().split())
	Max = max(Max, k + j)
print(Max)


import sys
r = 0
for line in sys.stdin:
	n = int(line.rstrip())
	for nums in sys.stdin:
		(x, y) = [int(_) for _ in nums.split()]
		if x + y > r:
			r = x + y
print(r)


try:
	n = int(input())
	l = []
	for i in range(n):
		(x, y) = map(int, input().split())
		l.append(x + y)
	print(max(l))
except EOFError:
	pass


t = int(input())
ans = 0
for x in range(t):
	l1 = [int(x) for x in input().split()]
	ans = max(ans, sum(l1))
print(ans)


n = int(input())
k = 0
for i in range(n):
	[a, b] = list(map(lambda x: int(x), input().split()))
	sum = a + b
	k = max(sum, k)
print(k)


n = int(input())
v = []
for i in range(n):
	(t1, t2) = input().split()
	v.append(int(t1) + int(t2))
print(max(v))


n = int(input())
s = 0
for i in range(n):
	z = input().split()
	x = int(z[0])
	y = int(z[1])
	if s < x + y:
		s = x + y
print(s)


a = 2
for _ in range(int(input())):
	(x, y) = map(int, input().split())
	a = max(a, x + y)
print(a)


a = []
for i in range(int(input())):
	a.append(sum(map(int, input().split())))
print(max(a))


n = int(input())
max = -1
for i in range(0, n):
	nums = [int(s) for s in input().split()]
	i = nums[0]
	j = nums[1]
	if i + j > max:
		max = i + j
print(max)


n = int(input())
sum = []
side = 0
for i in range(n):
	(x, y) = input().split()
	sum.append(int(x) + int(y))
print(max(sum))


t = int(input())
p = -1
for i in range(t):
	(x, y) = map(int, input().split())
	p = max(p, x + y)
print(p)


n = int(input())
an = 0
for _ in range(0, n):
	(a, b) = input().split(' ')
	an = max(an, int(a) + int(b))
print(an)


import math

def fn(x, y, f, m):
	v = (x - m) * m + y * m
	if v == 0:
		return True
	if v < 0 and f:
		return True
	if v > 0 and (not f):
		return True
	return False
c = 10 ** 18
n = int(input())
m = 1
v = (0 - m) * m
f = 0
if v < 0:
	f = 1
for i in range(n):
	(x, y) = list(map(int, input().split()))
	if not fn(x, y, f, m):
		high = c
		while m < high:
			mid = (m + high) // 2
			if fn(x, y, f, mid):
				high = mid - 1
			else:
				m = mid + 1
		if not fn(x, y, f, m):
			m += 1
		elif fn(x, y, f, m - 1):
			m -= 1
print(m)


n = int(input())
l = []
for i in range(n):
	(a, b) = [int(i) for i in input().split()]
	l.append(b + a)
print(max(l))


import sys
throwaway = int(input())
max_side_size = 0
for point_line in sys.stdin:
	(x, y) = point_line.split()
	x = int(x)
	y = int(y)
	if x + y > max_side_size:
		max_side_size = x + y
print(max_side_size)


N = int(input())
Max = 0
for i in range(N):
	X = list(map(int, input().split()))
	if X[0] + X[1] > Max:
		Max = X[0] + X[1]
print(Max)


n = int(input())
points = []
for i in range(n):
	mots = input().split(' ')
	points.append(mots)
a = int(points[0][0]) + int(points[0][1])
for i in range(n):
	if int(points[i][0]) + int(points[i][1]) > a:
		a = int(points[i][0]) + int(points[i][1])
print(a)


n = int(input())
(x, y) = map(int, input().split())
maximum = x + y
for _ in range(n - 1):
	(x, y) = map(int, input().split())
	if x + y > maximum:
		maximum = x + y
print(maximum)


n = int(input())
t = 0
for a in range(n):
	(x, y) = map(int, input().split())
	a = x + y
	if a > t:
		t = a
print(t)


n = int(input())
ans = 0
for x in range(n):
	(l, m) = [int(x) for x in input().split()]
	if l + m > ans:
		ans = l + m
print(ans)


import sys
import math
n = int(input())
comba = []
for _ in range(n):
	(a, b) = map(int, input().split())
	suma = a + b
	comba.append(suma)
print(max(comba))


p = tuple(tuple((map(int, input().split()) for _ in range(int(input())))))
print(max((x + y for (x, y) in p)))


n = int(input())
l = []
k = []
for i in range(n):
	(x, y) = map(int, input().split())
	k = [x, y]
	l.append(k)
max = sum(l[0])
for i in range(1, n):
	if sum(l[i]) > max:
		max = sum(l[i])
print(max)


def Pmax(P):
	i_all = len(P)
	P_max = 0
	for i in range(1, i_all):
		if sum(P[i]) > sum(P[P_max]):
			P_max = i
	return P[P_max]
P = []
i_all = int(input())
for i in range(i_all):
	[x, y] = input().split(' ')[:2]
	P += [[int(x), int(y)]]
print(sum(Pmax(P)))


from sys import stdin
max_val = int(10000000000000.0)
min_val = int(-10000000000000.0)

def read_int():
	return int(stdin.readline())

def read_ints():
	return [int(x) for x in stdin.readline().split()]

def read_str():
	return input()

def read_strs():
	return [x for x in stdin.readline().split()]
print(max((sum(read_ints()) for _ in [0] * read_int())))


import math
n = int(input())
a = [0, 0]
vallist = []
for item in range(n):
	(x, y) = list(map(int, input().split()))
	vals = [x, y]
	vallist.append(vals)
print(sum(sorted(vallist, key=lambda x: sum(x))[-1]))


import sys
import math
import bisect
import itertools

def main():
	A = []
	for _ in range(int(input())):
		(a, b) = map(int, input().split())
		A.append(a + b)
	print(max(A))
main()


n = int(input())
i = 0
point = 0
while i < n:
	(x, y) = input().split()
	x = int(x)
	y = int(y)
	if x + y >= point:
		point = x + y
	i = i + 1
print(point)


n = int(input())
p = []
for i in range(n):
	l = list(map(int, input().split()))
	p.append(l[0] + l[1])
p.sort()
print(p[-1])


from collections import defaultdict
import math
n = int(input())
ans = 0
for _ in range(n):
	(x, y) = map(int, input().split())
	ans = max(ans, x + y)
print(ans)


n = int(input())
dist = 0
for n in range(n):
	a = list(map(int, input().split()))
	d = a[0] + a[1]
	if d > dist:
		dist = d
print(dist)


n = int(input())
best = (0, 0)
for _ in range(n):
	(x, y) = map(int, input().split())
	if x + y > best[0] + best[1]:
		best = (x, y)
print(best[0] + best[1])


import math as ma
import sys
from sys import exit
from decimal import Decimal as dec
from itertools import permutations

def li():
	return list(map(int, input().split()))

def modInverse(a, m):
	m0 = m
	y = 0
	x = 1
	if m == 1:
		return 0
	while a > 1:
		q = a // m
		t = m
		m = a % m
		a = t
		t = y
		y = x - q * y
		x = t
	if x < 0:
		x = x + m0
	return x

def num():
	return map(int, input().split())

def nu():
	return int(input())

def find_gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
t = nu()
pp = 0
for i in range(t):
	(l, r) = num()
	pp = max(l + r, pp)
print(pp)


class Solution(object):

	def run(self):
		n = int(input())
		res = 0
		for _ in range(n):
			p = [int(x) for x in input().split(' ')]
			(x, y) = (p[0], p[1])
			res = max(res, x + y)
		print(res)
Solution().run()


k = int(input())
l = []
for i in range(k):
	(a, b) = map(int, input().split())
	l.append(a + b)
print(max(l))


c = 0
for _ in range(int(input())):
	(a, b) = map(int, input().strip().split()[:2])
	if a + b > c:
		c = a + b
		a1 = a
		b2 = b
print(a1 + b2)


n = int(input())
xYSum = 0
for i in range(n):
	newXYSum = sum(list(map(int, input().split())))
	if newXYSum > xYSum:
		xYSum = newXYSum
print(xYSum)


s = 0
for _ in range(int(input())):
	(l, r) = map(int, input().split())
	s = max(s, l + r)
print(s)


print(max([sum(map(int, input().split())) for i in range(int(input()))]))


def main():
	s = 0
	for _ in range(int(input())):
		x = sum([int(_) for _ in input().split()])
		s = max(s, x)
	print(s)
main()


n = int(input())
(maxx, maxy) = (0, 0)
for i in range(n):
	(x, y) = map(int, input().split())
	maxx = max(maxx, x + y)
print(maxx)


suma = 0
for i in range(int(input())):
	array = list(map(int, input().split()))
	if suma < sum(array):
		suma = sum(array)
print(suma)


Max = 0
n = int(input())
for i in range(n):
	[x, y] = str.split(input())
	x = int(x)
	y = int(y)
	if x + y > Max:
		Max = x + y
print(Max)


n = int(input())
shorterLength = 0
for _ in range(n):
	(x, y) = map(int, input().rstrip().split(' '))
	shorterLength = max(shorterLength, x + y)
print(shorterLength)


maxx = 0
for i in range(int(input())):
	(a, b) = map(int, input().split())
	maxx = max(a + b, maxx)
print(maxx)


t = int(input())
c = [0, 0]
for i in range(t):
	(a, b) = map(int, input().split())
	if a + b > c[0] + c[1]:
		c[0] = a
		c[1] = b
print(sum(c))


ans = []
for i in range(int(input())):
	x = list(map(int, input().split()))
	ans.append(sum(x))
print(max(ans))


n = int(input())
ans = int(0)
i = int(0)
while n > i:
	(x, y) = map(int, input().split())
	ans = max(ans, x + y)
	i += 1
print(ans)


n = int(input())
(x, y) = map(int, input().split())
s = x + y
for i in range(1, n):
	(x, y) = map(int, input().split())
	if x + y > s:
		s = x + y
print(s)


m = -1
for i in range(int(input())):
	(a, b) = map(int, input().split())
	if a + b > m:
		m = a + b
print(m)


import math
n = int(input())

class point(object):

	def __init__(self, x, y):
		self.x = x
		self.y = y
ans = 0
for i in range(n):
	[x, y] = map(int, input().split())
	ans = max(ans, x + y)
print(ans)


import math
n = int(input())
max = 0
for i in range(n):
	(a, b) = map(int, input().split())
	r = a + b
	if r > max:
		max = r
print(max)


def mi():
	return list(map(int, input().split()))
n = int(input())
ma = -1
while n:
	n -= 1
	(a, b) = mi()
	ma = max(ma, a + b)
print(ma)


a = int(input())
max1 = 0
for i in range(a):
	(x, y) = map(int, input().split())
	if x + y >= max1:
		max1 = x + y
print(max1)


t = int(input())
ans = -1
for i in range(t):
	(a, b) = map(int, input().split())
	ans = max(ans, a + b)
print(ans)


N = int(input())
M = 0
for i in range(N):
	(x, y) = map(int, input().split())
	M = max(M, x + y)
print(M)


n = int(input())
arr = []
for i in range(n):
	arr.append(tuple(map(int, input().split())))
print(max([i[0] + i[1] for i in arr]))


import math
p = 0
for k in range(int(input())):
	(a, b) = list(map(int, input().split()))
	t = a + b
	if t > p:
		p = t
print(p)


n = int(input())
c = []
c2 = []
for i in range(n):
	a = list(map(int, input().strip().split()))
	c.append(a)
s = 0
for i in c:
	if i[0] + i[1] >= s:
		s = i[0] + i[1]
print(s)


n = int(input())
ans = -1
for i in range(n):
	(a, b) = [int(x) for x in input().split()]
	ans = max(ans, a + b)
print(ans)


n = int(input())
maxs = -1
for i in range(n):
	(a, b) = map(int, input().split())
	if abs(a) + abs(b) > maxs:
		maxs = abs(a) + abs(b)
print(maxs)


from sys import stdin
input()
print(max((sum(map(int, s.split())) for s in stdin.read().splitlines())))


n = int(input())
side = 2
for itr in range(n):
	(x, y) = [int(k) for k in input().split()]
	if x + y > side:
		side = x + y
print(side)


n = int(input())
(x, y) = map(int, input().split())
mx = x + y
for i in range(n - 1):
	(x, y) = map(int, input().split())
	mx = max(mx, x + y)
print(mx)


n = int(input())
ans = 0
for _ in range(n):
	(x, y) = list(map(int, input().split()))
	ans = max(ans, x + y)
print(ans)


from sys import stdin, stdout
n = int(stdin.readline())
points = [tuple(map(int, line.split())) for line in stdin]
C = lambda x, y: x + y
c = 0
for (x, y) in points:
	c = max(c, C(x, y))
stdout.write(str(c))


n = int(input())
z = 0
for i in range(n):
	(a, b) = [int(x) for x in input().split()]
	c = a + b
	if c > z:
		z = c
print(z)


x = int(input())
ls = [tuple(map(int, input().split())) for _ in range(x)]
ls = list(map(lambda x: x[0] + x[1], ls))
print(max(ls))


n = int(input())
i = 0
a = []
while i < n:
	(x, y) = map(int, input().split())
	a.append(x + y)
	i += 1
a.sort()
print(a[len(a) - 1])


x = []
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	x.append(a + b)
print(max(x))


a = int(input())
max = 0
for i in range(a):
	(x, y) = map(int, input().split())
	l = x + y
	if max < l:
		max = l
		mx = x
		my = y
print(mx + my)


a = int(input())
l = [0]
for i in range(a):
	x = [int(i) for i in input().split()]
	if l[0] < sum(x):
		l[0] = sum(x)
print(l[0])


n = int(input())
mx = -10
for _ in range(n):
	(x, y) = map(int, input().split())
	mx = max(mx, x + y)
print(mx)


from math import ceil
n = int(input())
arr = []
for i in range(n):
	g = [int(i) for i in input().split()]
	arr.append(g[0] + g[1])
print(max(arr))


tc = int(input())
f = 0
while tc != 0:
	(a, b) = map(int, input().split())
	f = max(f, a + b)
	tc -= 1
print(f)


n = int(input())
max = 0
for i in range(n):
	(x, y) = [int(x) for x in input().split()]
	if max < x + y:
		max = x + y
print(max)


n = int(input())
A = []
for i in range(0, n):
	(x, y) = map(int, input().split())
	A.append([x, y])
L = []
for i in range(0, n):
	l = A[i][1] + A[i][0]
	L.append(l)
print(max(L))


n = int(input())
(a, b) = list(map(int, input().split()))
max = a + b
for i in range(n - 1):
	(a, b) = list(map(int, input().split()))
	if a + b > max:
		max = a + b
print(max)


num = int(input())
ma = 0
for i in range(num):
	k = list(map(int, input().split(' ')))
	if ma < sum(k):
		ma = sum(k)
print(ma)


from sys import stdin, stdout
import cProfile, math
from collections import Counter
printHeap = str()
test = False
memory_constrained = False

def display(string_to_print):
	stdout.write(str(string_to_print) + '\n')

def test_print(output):
	if test:
		stdout.write(str(output) + '\n')

def display_list(list1, sep=' '):
	stdout.write(sep.join(map(str, list1)) + '\n')

def get_int():
	return int(stdin.readline().strip())

def get_tuple():
	return map(int, stdin.readline().split())

def get_list():
	return list(map(int, stdin.readline().split()))
memory = dict()

def clear_cache():
	global memory
	memory = dict()

def cached_fn(fn, *args):
	global memory
	if args in memory:
		return memory[args]
	else:
		result = fn(*args)
		memory[args] = result
		return result

def main():
	x = get_int()
	maxi = 0
	for _ in range(x):
		(x, y) = get_tuple()
		maxi = max(x + y, maxi)
	print(maxi)
cProfile.run('main()') if test else main()


a = int(input())
maxx = 0
for i in range(a):
	(x, y) = map(int, input().split())
	maxx = max(maxx, x + y)
print(maxx)


n = int(input())
max_val = 0
for i in range(n):
	(x, y) = [int(t) for t in input().split()]
	if x + y > max_val:
		max_val = x + y
print(max_val)


n = int(input())
l = []
T = []
for i in range(n):
	b = input()
	l.append(b.split(' '))
	T.append(int(l[i][0]) + int(l[i][1]))
T.sort()
print(T[n - 1])


n = int(input())
res = -float('inf')
for _ in range(n):
	(a, b) = list(map(int, input().split()))
	res = max(res, a + b)
print(res)


n = int(input())
u = []
m = 0
for i in range(n):
	(a, b) = map(int, input().split())
	if a + b > m:
		m = a + b
print(m)


n = int(input())
a = [[int(i) for i in input().split()] for j in range(n)]
b = list(map(lambda x: x[0] + x[1], a))
print(max(b))


n = input()
n = int(n)
x = [0 for i in range(n)]
y = [0 for i in range(n)]
z = [0 for i in range(n)]
xmax = x[0]
a = 0
ymax = y[0]
b = 0
for i in range(n):
	(x[i], y[i]) = input().split()
	x[i] = int(x[i])
	y[i] = int(y[i])
	z[i] = x[i] + y[i]
z.sort()
print(z[n - 1])


n = int(input())
res = 0
for _ in range(n):
	xy = map(int, input().split())
	res = max(res, sum(xy))
print(res)


n = int(input())
dist = 0
(a, b) = (0, 0)
for i in range(n):
	(s, e) = map(int, input().split())
	if s + e > a + b:
		(a, b) = (s, e)
print(a + b)


l = []
for i in range(0, int(input())):
	y = input().split()
	l.append(int(y[0]) + int(y[1]))
print(max(l))


ans = 0
for i in range(int(input())):
	x = list(map(int, input().split()))
	if sum(x) > ans:
		ans = sum(x)
print(ans)


n = int(input())
maxi = -2
for t in range(n):
	[x, y] = [int(i) for i in input().split()]
	if x + y > maxi:
		maxi = x + y
print(maxi)


n = int(input())
(x, y) = (0, 0)
for _ in range(n):
	(a, b) = map(int, input().split())
	if a + b > x + y:
		x = a
		y = b
print(x + y)


n = int(input())
w = 0
for i in range(0, n):
	e = list(map(int, input().split()))
	s = sum(e)
	if s > w:
		w = s
print(w)


t = int(input())
max = 0
for i in range(t):
	(a, b) = map(int, input().split())
	if max < a + b:
		max = a + b
		(c, d) = (a, b)
print(c + d)


n = int(input())
ans = 0
for i in range(n):
	(l, r) = map(int, input().split())
	given = l + r
	ans = max(ans, given)
print(ans)


q = int(input())
e = []
for i in range(q):
	(a, b) = map(int, input().split())
	e.append(a + b)
print(max(e))


n = int(input())
l = []
for i in range(n):
	l.insert(i, input().split())
m = int(l[0][1]) + int(l[0][0])
for i in range(1, n):
	if int(l[i][0]) + int(l[i][1]) > m:
		m = int(l[i][0]) + int(l[i][1])
print(m)


n = int(input())
a = 0
for i in range(n):
	c = [int(x) for x in input().split()]
	a = max(a, sum(c))
print(a)


Max = 0
for _ in range(int(input())):
	L = [int(i) for i in input().split()]
	if sum(L) > Max:
		Max = sum(L)
print(Max)


n = int(input())
ls = []
for i in range(n):
	(x, y) = map(int, input().split())
	ans = x + y
	ls.append(ans)
max_sum = max(ls)
print(max_sum)


num_points = int(input())
res = -1
while num_points > 0:
	(a, b) = map(int, input().split())
	if a + b > res:
		res = a + b
	num_points -= 1
print(res)


n = int(input())
max = 0
for a in range(1, n + 1):
	[x, y] = list(map(int, input().split()))
	if x + y > max:
		max = x + y
print(max)


n = int(input())
mx = 0
for i in range(n):
	(x, y) = map(int, input().split())
	if x + y > mx:
		mx = x + y
		xi = x
		yi = y
print(xi + yi)


n = int(input())
min_len = 0
for i in range(n):
	(x, y) = list(map(int, input().split()))
	length = x + y
	if length > min_len:
		min_len = length
print(min_len)


import sys
import math
get_string = lambda : sys.stdin.readline().strip()
get_int_list = lambda : list(map(int, sys.stdin.readline().strip().split()))
get_intList_from_str = lambda : list(map(int, list(sys.stdin.readline().strip())))
get_charList_from_str = lambda : list(sys.stdin.readline().strip())
get_char_list = lambda : sys.stdin.readline().strip().split()
get_int = lambda : int(sys.stdin.readline())
pt = lambda x: sys.stdout.write(str(x))
n = get_int()
matrix = [0] * n
for i in range(n):
	matrix[i] = get_int_list()
matrix = sorted(matrix, key=lambda x: x[0] + x[1])
print(matrix[-1][0] + matrix[-1][1])


t = int(input())
ans = 0
for _ in range(t):
	(x, y) = map(int, input().split())
	if x + y > ans:
		ans = x + y
print(ans)


n = int(input())
c = 0
m = 0
for i in range(n):
	(x, y) = map(int, input().split())
	c += x + y
	if c > m:
		m = c
	c = 0
print(m)


n = int(input())
list = []
for i in range(0, n):
	(a, b) = input().split(' ')
	a = int(a)
	b = int(b)
	sum = a + b
	list.append(sum)
print(max(list))


n = int(input())
a = []
count = 1
while n > 0:
	b = [int(b) for b in input().split()]
	a.append(sum(b))
	n -= 1
print(max(a))


t = int(input())
f = 0
for case in range(t):
	l = [int(x) for x in input().split()]
	f = max(f, sum(l))
print(f)


ans = 0
for i in range(int(input())):
	(x, y) = map(int, input().split())
	temp = x + y
	ans = max(ans, temp)
print(ans)


import sys
input = sys.stdin.readline
n = int(input())
tx = 0
ty = 0
for _ in range(n):
	(x, y) = map(int, input().split())
	if tx + ty < x + y:
		tx = x
		ty = y
print(ty + tx)


maxi = 2
for _ in range(int(input())):
	x = sum(map(int, input().split()))
	if x > maxi:
		maxi = x
print(maxi)


import math
n = int(input())
d = 0
X = 0
Y = 0
for i in range(n):
	(x, y) = [int(x) for x in input().split()]
	if x + y > d:
		d = x + y
		X = x
		Y = y
print(X + Y)


from sys import stdin
n = int(stdin.readline())
res = 0
for i in range(n):
	(x, y) = map(int, stdin.readline().split())
	q = x + y
	if q > res:
		res = q
print(res)


import sys
import math
import itertools
import time

def get_line():
	return list(map(int, sys.stdin.readline().strip().split()))

def in1():
	return int(input())
n = in1()
t1 = -1
for i in range(n):
	(x, y) = get_line()
	t2 = x + y
	if t2 > t1:
		t1 = t2
print(t1)


a = int(input())
max = 0
for i in range(a):
	b = input().split()
	c = int(b[1])
	b = int(b[0])
	if max < b + c:
		max = b + c
print(max)


import math
n = int(input())
maxm = 0
for i in range(n):
	a = list(map(int, input().split(' ')))
	maxm = max(maxm, sum(a))
print(maxm)


n = int(input())
m = 0
while n > 0:
	l = list(map(int, input().split(' ')))
	dis = l[0] + l[1]
	if dis > m:
		m = dis
		a = l[0]
		b = l[1]
	n = n - 1
print(a + b)


n = int(input())
l = [tuple(map(int, input().split())) for i in range(0, n)]
print(max([x[0] + x[1] for x in l]))


def solve(n, points):
	maxi = 0
	for (x, y) in points:
		maxi = max(maxi, x + y)
	return maxi

def main():
	n = int(input())
	points = [list(map(int, input().split())) for _ in range(n)]
	print(solve(n, points))
main()


n = int(input())
maxi = 0
for i in range(n):
	y = 0
	s = input()
	s = s.split()
	for j in range(2):
		s[j] = int(s[j])
	y = s[0] + s[1]
	if y > maxi:
		maxi = y
print(maxi)


a = 0
for _ in ' ' * int(input()):
	a = max(a, sum(map(int, input().split())))
print(a)


from sys import stdout, stdin, setrecursionlimit
from io import BytesIO, IOBase
from collections import *
from itertools import *
from bisect import *
from string import *
from queue import *
from heapq import *
from math import *
from re import *
from os import *

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = read(self._fd, max(fstat(self._fd).st_size, 8192))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = read(self._fd, max(fstat(self._fd).st_size, 8192))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(stdin, stdout) = (IOWrapper(stdin), IOWrapper(stdout))
(graph, mod, szzz) = ({}, 10 ** 9 + 7, lambda : sorted(zzz()))

def getStr():
	return input()

def getInt():
	return int(input())

def listStr():
	return list(input())

def getStrs():
	return input().split()

def isInt(s):
	return '0' <= s[0] <= '9'

def input():
	return stdin.readline().strip()

def zzz():
	return [int(i) for i in input().split()]

def output(answer, end='\n'):
	stdout.write(str(answer) + end)

def lcd(xnum1, xnum2):
	return xnum1 * xnum2 // gcd(xnum1, xnum2)
dx = [-1, 1, 0, 0, 1, -1, 1, -1]
dy = [0, 0, 1, -1, 1, -1, -1, 1]
daysInMounth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
num = getInt()
ans = float('-inf')
for _ in range(num):
	(x, y) = zzz()
	ans = max(ans, x + y)
print(ans)


n = int(input())
a = -1
for i in range(n):
	(u, v) = [int(x) for x in input().split()]
	a = max(a, u + v)
print(a)


from sys import stdin
from collections import Counter
from math import sqrt, factorial, log10, log, floor, ceil
from itertools import permutations, combinations, combinations_with_replacement
input = stdin.readline

def li():
	return list(map(int, input().split()))

def lis():
	return list(map(str, input().split()))

def mp():
	return map(int, input().split())

def inp():
	return int(input())

def inps():
	return str(input().strip())

def pr(n):
	return stdout.write(str(n) + '\n')
INF = float('inf')

def solve():
	n = inp()
	mx = 0
	for i in range(n):
		(a, b) = mp()
		mx = max(mx, a + b)
	print(mx)
t = 1
for i in range(t):
	solve()


n = int(input())
c = 0
for i in range(n):
	(a, b) = map(int, input().strip().split())
	c = max(c, a + b)
print(c)


from sys import exit
n = int(input())
ans = 0
for i in range(n):
	(a, b) = map(int, input().split())
	ans = max(ans, a + b)
print(ans)


from sys import stdin, stdout, exit

def sin():
	return stdin.readline().rstrip()

def listInput():
	return list(map(int, sin().split()))

def printBS(li):
	if not li:
		return
	for i in range(len(li) - 1):
		stdout.write('%d ' % li[i])
	stdout.write('%d\n' % li[-1])
n = int(sin())
ans = 0
for _ in range(n):
	(a, b) = listInput()
	ans = max(ans, a + b)
print(ans)


n = int(input())
x = []
y = []
for i in range(n):
	(a, b) = map(int, input().split())
	x.append(a)
	y.append(b)
mazz = 0
for i in range(n):
	if x[i] + y[i] > mazz:
		mazz = x[i] + y[i]
print(mazz)


s = 0
for _ in range(int(input())):
	l = list(map(int, input().split()))
	if sum(l) > s:
		s = sum(l)
print(s)


n = int(input())
max_x = 0
max_y = 0
max_s = 0
for _ in range(n):
	(x, y) = map(int, input().split())
	if x + y > max_s:
		max_s = x + y
		max_x = x
		max_y = y
print(max_s)


from sys import stdin
input = lambda : stdin.readline()

def main():
	N = int(input())
	XY = [tuple(map(int, input().split())) for _ in [0] * N]
	l = 0
	for (x, y) in XY:
		l = max(l, x + y)
	print(l)
main()


n = int(input())
m = 0
for i in range(0, n):
	ln = [int(j) for j in input().split(' ')]
	m = max(m, ln[0] + ln[1])
print(m)


x = -1
for _ in range(int(input())):
	(a, b) = [int(e) for e in input().split()]
	x = max(x, a + b)
print(x)


num_points = int(input())
solution = 0
for _ in range(num_points):
	(x, y) = list(map(int, input().split()))
	solution = max(solution, x + y)
print(solution)


d = []
for i in range(int(input().strip())):
	(x, y) = map(int, input().strip().split())
	d.append([x, y])
mx = 0
for i in range(len(d)):
	if d[i][0] + d[i][1] >= mx:
		mx = d[i][0] + d[i][1]
print(mx)


n = int(input())
maxx = 0
maxy = 0
maxarea = 0
for it in list(range(n)):
	inputstr = input().split()
	x = int(inputstr[0])
	y = int(inputstr[1])
	area = 0.5 * (x + y) ** 2
	if maxarea < area:
		maxarea = area
		maxx = x
		maxy = y
print(maxy + maxx)


hi = int(input())
maximum = 0
for m in range(hi):
	i = input().split()
	j = int(i[0])
	k = int(i[1])
	if j + k > maximum:
		maximum = j + k
print(maximum)


n = int(input().strip())
ans = 0
for _ in range(n):
	(x, y) = [int(i) for i in input().strip().split()]
	ans = max(ans, x + y)
print(ans)


n = int(input())
lst = [sum(map(int, input().split())) for i in ' ' * n]
lst.sort()
print(lst[-1])


R = lambda : map(int, input().split())
mx = 0
for i in range(int(input())):
	(x, y) = R()
	mx = max(mx, x + y)
print(mx)


i = int(input())
a = i
L = []
M = []
P = []
while i > 0:
	k = input()
	s = k.split()
	L.append(s)
	i = i - 1
while a > 0:
	iii = L[a - 1]
	ooo = int(iii[0])
	ppp = int(iii[1])
	M.append(ooo + ppp)
	a = a - 1
P = sorted(M)
print(max(P))


n_points = int(input())
r = 0
for _ in range(n_points):
	(x, y) = map(int, input().split())
	r = max(r, x + y)
print(r)


n = int(input())
ans = 0
for i in range(n):
	ans = max(ans, sum([int(x) for x in input().split()]))
print(ans)


n = int(input())
l = []
k = []
for i in range(n):
	l = list(map(int, input().split()))
	h = sum(l)
	k.append(h)
print(max(k))


c = -1
for i in range(int(input())):
	(k, r) = map(int, input().split())
	c = max(c, k + r)
print(c)


n = int(input())
A = [[int(i) for i in input().split()] for i in range(n)]
ans = 0
for a in A:
	ans = max(ans, sum(a))
print(ans)


n = int(input())
out = 1
for i in range(n):
	(x, y) = [int(el) for el in input().split()]
	out = max(out, x + y)
print(out)


n = int(input())
max_ = 0
for i in range(0, n):
	c = list(map(int, input().split()))
	if max_ < sum(c):
		max_ = sum(c)
print(max_)


n = int(input())
a = 0
for abc in range(n):
	(x, y) = list(map(int, input().split()))
	if x + y > a:
		a = x + y
print(a)


t = int(input())
sumi = 0
for x in range(t):
	xy = input().split()
	x = int(xy[0])
	y = int(xy[1])
	if x + y > sumi:
		sumi = x + y
print(sumi)


n = int(input())
ptSum = []
for i in range(n):
	(a1, a2) = map(int, input().split())
	ptSum.append(a1 + a2)
print(max(ptSum))


n = int(input())
side = 0
for i in range(n):
	inp = input().split(' ')
	x = int(inp[0])
	y = int(inp[1])
	tempo = x + y
	if tempo > side:
		side = tempo
print(side)


n = int(input())
m = [[int(i) for i in input().split()] for i in range(n)]
print(max([sum(m[i]) for i in range(n)]))


import sys
import math

class MyReader:

	def __init__(self):
		filename = 'file.in'
		if self.isLocal():
			self.file = open(filename)
		self.str = ['']
		self.ind = 1

	def isLocal(self):
		return len(sys.argv) > 1 and sys.argv[1] == 'SCHULLZ'

	def nextString(self):
		if self.isLocal():
			return self.file.read()
		else:
			return input()

	def nextInt(self):
		return int(self.nextToken())

	def nextToken(self):
		if self.ind >= len(self.str):
			self.ind = 0
			self.str = self.nextString().split()
		self.ind += 1
		return self.str[self.ind - 1]

def Solve():
	n = -1
	try:
		n = rdr.nextInt()
	except Exception:
		return False
	mx = 0
	for i in range(0, n):
		x = rdr.nextInt()
		y = rdr.nextInt()
		mx = max(x + y, mx)
	print(mx)
	return True
rdr = MyReader()
if not rdr.isLocal():
	Solve()
else:
	while Solve():
		fgh = 1


import math
from collections import deque
from functools import reduce
from sys import stdin, stdout, exit

def main():
	cin = Scanner()
	answer = 0
	t = cin.next_int()
	while t > 0:
		t -= 1
		aux = cin.next_array()
		answer = max(answer, aux[0] + aux[1])
	print(answer)

class Scanner:

	def next_int(self):
		return int(self.next_line())

	def next_float(self):
		return float(self.next_line())

	def next_line(self):
		return stdin.readline().strip()

	def next_array(self, fun=int):
		line = self.next_line().split(' ')
		return line if fun is str else list(map(fun, line))
main()


n = int(input())
_max = 0
for i in range(n):
	s = sum((int(x) for x in input().split(' ')))
	if _max < s:
		_max = s
print(_max)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def main():
	n = I()
	a = [LI() for _ in range(n)]
	return max(map(sum, a))
print(main())


(mx, my, m) = (0, 0, 0)
for i in range(int(input())):
	x = list(map(int, input().split()))
	(xc, yc) = (x[0], x[1])
	if xc + yc > m:
		m = xc + yc
		(mx, my) = (xc, yc)
print(mx + my)


def ii():
	return int(input())

def ss():
	return [x for x in input()]

def si():
	return [int(x) for x in input().split()]

def mi():
	return map(int, input().split())
a = ii()
ans = 0
for i in range(a):
	ans = max(ans, sum(si()))
print(ans)


result = 0
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	result = max(result, a + b)
print(result)


n = int(input())
mx = 0
for i in range(n):
	a = [int(x) for x in input().split()]
	mx = max(mx, a[0] + a[1])
print(mx)


ans = 0
for _ in range(int(input())):
	ans = max(ans, sum(list(map(int, input().split()))))
print(ans)


n = int(input())
mx = 0
c = [0, 0]
p = [[int(j) for j in input().split()] for i in range(n)]
for i in p:
	d = i[0] + i[1]
	if d > mx:
		mx = d
print(mx)


n = int(input())
length = 0
for i in range(n):
	add = sum(map(int, input().split()))
	length = max(length, add)
print(length)


n = int(input())
res = 0
for i in range(n):
	k = sum((int(j) for j in input().split()))
	res = max(k, res)
print(res)


def cover_points():
	total = int(input())
	points = []
	for i in range(total):
		points.append(input().split())
	output = 1
	for i in range(len(points)):
		temp = int(points[i][0]) + int(points[i][1])
		if temp > output:
			output = temp
	print(output)
	return
cover_points()


n = int(input())
d = -2
for i in range(0, n):
	(x, y) = map(int, input().rstrip().split())
	d = max(d, x + y)
print(d)


points = []
for _ in range(int(input())):
	(a, b) = map(int, input().split())
	length = a + b
	points.append(length)
print(max(points))


n = int(input())
length = 0
for i in range(n):
	string = input().split(' ')
	x = int(string[0])
	y = int(string[1])
	current = x + y
	if length < current:
		length = current
print(length)


n = int(input().strip())
t = []

def points(f):
	f.sort(key=lambda d: d[0] + d[1])
	return f[len(f) - 1][0] + f[len(f) - 1][1]
for i in range(n):
	m = input().strip().split()
	t.append([int(m[0]), int(m[1])])
print(points(t))


n = int(input())
max_val = 0
for i in range(n):
	a = list(map(int, input().split(' ')))
	max_val = max(max_val, a[0] + a[1])
print(max_val)


print(max([sum([int(x) for x in input().split()]) for i in range(int(input()))]))


n = int(input())
maxSum = 0
for i in range(n):
	s = sum(map(int, input().split()))
	if s > maxSum:
		maxSum = s
print(maxSum)


def main():
	n = int(input())
	p = []
	for i in range(n):
		p.append(tuple(map(int, input().split())))
	ans = 0
	for (i, j) in p:
		ans = max(ans, i + j)
	print(ans)
main()


def main():
	n = int(input())
	mx = -99999999999999999
	for i in range(n):
		mx = max(mx, sum(list(map(int, input().split()))))
	print(mx)
main()


number = int(input())
data = []
for m in range(number):
	(a, b) = map(int, input().split())
	data.append(a + b)
print(max(data))


n = int(input())
T = []
for i in range(n):
	e = input()
	x = e.split(' ')
	T += [int(x[0]) + int(x[1])]
T.sort()
print(T[n - 1])


n = 0
a = []
kol = int(input())
z1 = 0
z2 = 1
while n != kol:
	n = n + 1
	(b, c) = map(int, input().split())
	a[z1:z2] = [c + b]
	z1 = z1 + 1
	z2 = z2 + 1
print(max(a))


n = int(input())
ma = 0
for i in range(n):
	(a, b) = list(map(int, input().split()))
	if a + b > ma:
		ma = a + b
print(ma)


coordinates = [tuple(map(int, input().split())) for i in range(int(input()))]
result = 0
for (x, y) in coordinates:
	result = max(result, x + y)
print(result)


n = int(input())
r = 0
for i in range(n):
	(a, b) = tuple(map(int, input().split()))
	if a + b > r:
		r = a + b
print(r)


n = int(input())
tx = 0
ty = 0
for _ in range(n):
	(x, y) = map(int, input().split())
	if tx + ty < x + y:
		tx = x
		ty = y
print(ty + tx)


n = int(input())
answer = -1
for i in range(n):
	(x, y) = [int(x) for x in input().split()]
	if x + y > answer:
		answer = x + y
print(answer)


from __future__ import division, print_function
from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase
import bisect
from heapq import *
from math import *
from collections import deque
from collections import Counter as counter
from itertools import combinations as comb
from itertools import permutations as permutate
from bisect import bisect_left as bl
from bisect import bisect_right as br
from bisect import bisect
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
mod = 1000000007

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def graph(vertex):
	return [[] for i in range(0, vertex + 1)]

def zerolist(n):
	return [0] * n

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()

def printlist(a):
	for p in range(0, len(a)):
		out(str(a[p]) + ' ')

def lcm(a, b):
	return a * b // gcd(a, b)

def power(a, b):
	ans = 1
	while b > 0:
		if b % 2 == 1:
			ans *= a
		a *= a
		b //= 2
	return ans

def ncr(n, r):
	return factorial(n) // (factorial(r) * factorial(max(n - r, 1)))

def isPrime(n):
	if n <= 1:
		return False
	if n <= 3:
		return True
	if n % 2 == 0 or n % 3 == 0:
		return False
	i = 5
	while i * i <= n:
		if n % i == 0 or n % (i + 2) == 0:
			return False
		i = i + 6
	return True

def bs(a, l, h, x):
	while l < h:
		mid = (l + h) // 2
		if a[mid] == x:
			return mid
		if a[mid] < x:
			l = mid + 1
		else:
			h = mid
	return l

def sieve(a):
	for i in range(3, 10 ** 6 + 1, 2):
		a[i] = 1
	for i in range(3, 10 ** 6 + 1, 2):
		for j in range(i * i, 10 ** 6 + 1, i):
			a[j] = 0
	a[2] = 1
	return a

def solve():
	n = int(inp())
	ans = 0
	for i in range(n):
		(a, b) = sep()
		ans = max(ans, a + b)
	print(ans)
testcase(1)


from math import sqrt
n = int(input())
l = []
for _ in range(n):
	l1 = list(map(int, input().split()))
	l.append(l1)
ld = []
for i in l:
	ld.append(sqrt(i[0] * 2 + i[1] * 2))
indx = ld.index(max(ld))
b = l[indx][0] + l[indx][1]
print(b)