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: interview

Starter code:

Solutions:
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())
ans = 0

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

print(ans)

n = int(input())

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

print(answer)


n = int(input())

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


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


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)


3

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)


def __starting_point():
    main()

__starting_point()

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

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)

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))


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))

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)

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)


n = int(input())


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


print(Max)

n = int(input())
mx = 0

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



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())
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)


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)


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


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

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)

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

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

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)

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