Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() int {
	n, err := strconv.Atoi(nextString())
	if err != nil {
		fmt.Printf("strconv.Atoi failed: %v\n", err)
	}
	return n
}

func max(x, y int) int {
	if x > y {
		return x
	}
	return y
}

func main() {
	scanner.Split(bufio.ScanWords)
	a := make([]int, 8)
	for i := 0; i < 8; i++ {
		a[i] = nextInt()
	}
	s := 0
	for i := 0; i < 4; i++ {
		s += a[i]
	}
	t := 0
	for i := 4; i < 8; i++ {
		t += a[i]
	}
	fmt.Println(max(s, t))
}

Python: A = list(map(input().split()))
B = list(map(input().split()))
max = max([max(A), max(B)])
print(max)

Python: print(max(sum(map(int, input().split())), sum(map(int, input().split()))))

Python: a=[0 for i in range(2)]
b=[0,0]

for i in range(2):
	a[i]=input().split()
	for j in range(4):
		b[i]+=int(a[i][j])
print(max(b))

Python: s1 = sum([ int(s) for s in input().split() ])
s2 = sum([ int(s) for s in input().split() ])

print(max(s1,s2))

Python: #!/usr/bin/env python
# -*- coding: utf-8 -*-

a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]

ret = max(sum(a), sum(b))

print(ret)

Python: magro = 0

saba = []
saba=map(int,raw_input().split(' '))
#print("ika")
ika=map(int,raw_input().split(' '))
print(max(sum(saba), sum(ika)))
neko = 0
hage = 90

Python: a = map(int, input().split())
b = map(int, input().split())
print(max(sum(a,b)))

Python: def main():
    print(max(sum([int(x) for x in input().split()]), sum([int(y) for y in input().split()])))


if __name__ == '__main__':
    main()

Python: A, B = [list(map(int, input().split())) for _ in range(2)]
print(max([sum(A), sum(B)]))

Python: s = sum(list(map(int, input().split())))
t = sum(list(map(int, input().split())))

print(max(s, t))

Python: a = map(int, input().split())
b = map(int, input().split())
print(max(sum(a),sum(b)))

Python: a=list(map(int, input().split()))
b=list(map(int, input().split()))
if sum(b)<=sum(a):
  print(sum(a))
else:
  print(sum(b))

Python: culc_score = lambda :sum(int(score) for score in input().split())
x = culc_score()
y = culc_score()
print(x if x > y else y)

Python: alist = [int(s) for s in input().strip().split(' ')]
blist = [int(s) for s in input().strip().split(' ')]
print(max(sum(alist), sum(blist)))

Python: print(max(sum(map(int,input().split())),sum(map(int,input().split()))))

Python: print(max(sum(list(map(int,input().split()))),sum(list(map(int,input().split())))))

Python: # AOJ 0510: Score
# Python3 2018.6.29 bal4u

sa = sum(list(map(int, input().split())))
sb = sum(list(map(int, input().split())))
print(sa if sa >= sb else sb)

Python: import sys
ia,ma,sa,ea=map(int,input().split())
ib,mb,sb,eb=map(int,input().split())
sum_a=ia+ma+sa+ea
sum_b=ib+mb+sb+eb
if(sum_a>=sum_b):
    print(sum_a)
else:
    print(sum_b)

Python: print(max(sum(list(map(int,input().split()))),sum(list(map(int,input().split())))))

Python: t1 = sum(map(int,input().split(' ')))
t2 = sum(map(int,input().split(' ')))
print(max(t1,t2))

Python: a = sum(list(map(int, input().split())))
print(max(sum(list(map(int, input().split()))), a))

Python: # coding: utf-8

a = map(int, raw_input().split())
b = map(int, raw_input().split())

a_sum = sum(a)
b_sum = sum(b)

if a_sum > b_sum:
	print(a_sum)
else:
	print(b_sum)

Python: import sys
import os
line = list(map(int, input().split()))
S = line[0] + line[1] + line[2] + line[3]

line1 = list(map(int, input().split()))
T = line1[0] + line1[1] + line1[2] + line1[3]

if S >= T:
    print(S)
else:
    print(T)

Python: a=list(map(int,input().split()))
b=list(map(int,input().split()))
if sum(a)>sum(b):
  print(sum(a))
else:
  print(sum(b))

Python: a,b,c,d = map(int,input().split(" "))
e,f,g,h = map(int,input().split(" "))
if a+b+c+d >= e+f+g+h:
  print(a+b+c+d)
else:
  print(e+f+g+h)

Python: a,b,c,d=map(int,input().split())
e,f,g,h=map(int,input().split())
A=a+b+c+d
B=e+f+g+h
if A==B or A>B:
    print(A)
else:
    print(B)

Python: print(max(sum(list(map(int, input().split()))),sum(list(map(int, input().split())))))

Python: A = list(map(int,input().split()))
B = list(map(int,input().split()))
t = sum(A)
s = sum(B)
if t>=s:
	print(t)
else:
	print(s)

Python: A = list(map(int,input().split()))
B = list(map(int,input().split()))
print(max(sum(A),sum(B)))

Python: print(max(sum(list(map(int, input().split()))), sum(list(map(int, input().split())))))

Python: A = [int(x) for x in input().split()]
B = [int(x) for x in input().split()]


print(max(sum(A),sum(B)))

Python: num_list = []
for num in range(2):
    kei = 0
    num_line = input().split(" ")
    for num1 in range(0,4):
        kei += int(num_line[num1])
    num_list.append(kei)
num_list.sort()
print(num_list[1])

Python: while True:
  a,b,c,d=map(int,input().split())
  e,f,g,h=map(int,input().split())
  x=a+b+c+d
  y=e+f+g+h
  if x<y:
    print(y)
  else:
    print(x)

Python: a=list(map(int,input().split()))
b=list(map(int,input().split()))
if sum(a)<sum(b):
	print(sum(b))
else:
	print(sum(a))

Python: a = sum(map(int, input().split()))
b = sum(map(int, input().split()))
print (max(a,b))

Python: a = map(int, input().split())
b = map(int, input().split())
suma = sum(a)
sumb = sum(b)
if suma>sumb:
    print(suma)
else:
    print(sumb)

Python: print(max(sum(map(int,input().split())),sum(map(int,input().split()))))

Python: a,b,c,d=map(int,input().split())
e,f,g,h=map(int,input().split())
S=a+b+c+d
T=e+f+g+h
if S>T :
    print(S)
else :
    print(T)

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

Python: a = sum(map(int, raw_input().split()))
b = sum(map(int, raw_input().split()))
print (max(a,b))

Python: a = list(map(int,input().split()))
b = list(map(int,input().split()))
c = sum(a)
d = sum(b)
if c < d:
    print(d)
else:
    print(c)

Python: scores = [list(map(int, input().split())) for _ in range(2)]
print(max(sum(scores[0]), sum(scores[1])))

Python: A=list(map(int,input().split()))
B=list(map(int,input().split()))
print(max(sum(A),sum(B)))

Python: a,b,c,d  = map(int,input().split())
x,y,z,w  = map(int,input().split())

A = a+b+c+d
B = x+y+z+w

print(max(A,B))

Python: import sys
f = sys.stdin

s, t = [sum(map(int, f.readline().split())) for _ in range(2)]
print(s if s >= t else t)

Python: n=list(map(int,input().split()))
m=list(map(int,input().split()))
print(max(sum(n),sum(m)))

Python: s = sum([int(x) for x in input().split(' ')])
t = sum([int(x) for x in input().split(' ')])
print(max(s, t))

Python: if __name__ == '__main__':
    # ??????????????\???
    scores_a = [int(x) for x in input().split(' ')]
    scores_b = [int(x) for x in input().split(' ')]

    # ???????????????
    # ???????????????
    print('{0}'.format(max(sum(scores_a), sum(scores_b))))

Python: s = sum(list(map(int, input().split())))
t = sum(list(map(int, input().split())))

print(max(s, t))

Python: # -*- coding: utf-8 -*-
a1, a2, a3, a4 = map(int,input().split())
b1, b2, b3, b4 = map(int,input().split())

S = a1 + a2 + a3 + a4
T = b1 + b2 + b3 + b4
print(max(S,T))

Python: a = list(map(int,input().split()))
b = list(map(int,input().split()))
if sum(a) > sum(b) or sum(a) == sum(b): print(sum(a))
else: print(sum(b))

Python: A = list(map(int, input().split()))
B = list(map(int, input().split()))
max_sum = max([sum(A), sum(B)])
print(max_sum)

Python: # coding: utf-8
# Your code here!
i1,m1,p1,e1=map(int,input().split())
i2,m2,p2,e2=map(int,input().split())

S=i1+m1+p1+e1
T=i2+m2+p2+e2

S,T=sorted([S,T])

print(T)

Python: print(max(sum(map(int,input().split()))for _ in'12'))

Python: while True:
  a,b,c,d=map(int,input().split())
  e,f,g,h=map(int,input().split())
  x=a+b+c+d
  y=e+f+g+h
  if x<=y:
    print(y)
  else:
    print(x)

Python: A_points = [int(i) for i in input().split(' ') ]
B_points = [int(i) for i in input().split(' ') ]

if sum(A_points) < sum(B_points):
    print(sum(B_points))

else:
    print(sum(A_points))