시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 128 MB 1444 1123 1045 80.446%

문제

최근 온라인에서의 프로그래밍 콘테스트가 열렸다. W 대학과 K 대학의 컴퓨터 클럽은 이전부터 라이벌 관계에있어,이 콘테스트를 이용하여 양자의 우열을 정하자라는 것이되었다.

이번이 두 대학에서 모두 10 명씩이 콘테스트에 참여했다. 긴 논의 끝에 참가한 10 명 중 득점이 높은 사람에서 3 명의 점수를 합산하여 대학의 득점으로하기로 했다.

W 대학 및 K 대학 참가자의 점수 데이터가 주어진다. 이때, 각각의 대학의 점수를 계산하는 프로그램을 작성하라.

입력

입력은 20 행으로 구성된다. 1 번째 줄부터 10 번째 줄에는 W 대학의 각 참가자의 점수를 나타내는 정수가 11 번째 줄부터 20 번째 줄에는 K 대학의 각 참가자의 점수를 나타내는 정수가 적혀있다. 이 정수는 모두 0 이상 100 이하이다.

출력

W 대학 점수와 K 대학의 점수를 순서대로 공백으로 구분하여 출력하라.

예제 입력 1

23
23
20
15
15
14
13
9
7
6
25
19
17
17
16
13
12
11
9
5

예제 출력 1

66 61
W3sicHJvYmxlbV9pZCI6IjU1NzYiLCJwcm9ibGVtX2xhbmciOiIwIiwidGl0bGUiOiJcdWNmNThcdWQxNGNcdWMyYTRcdWQyYjgiLCJkZXNjcmlwdGlvbiI6IjxwPlx1Y2Q1Y1x1YWRmYyBcdWM2MjhcdWI3N2NcdWM3NzhcdWM1ZDBcdWMxMWNcdWM3NTggXHVkNTA0XHViODVjXHVhZGY4XHViNzk4XHViYzBkIFx1Y2Y1OFx1ZDE0Y1x1YzJhNFx1ZDJiOFx1YWMwMCBcdWM1ZjRcdWI4MzhcdWIyZTQuJm5ic3A7VyBcdWIzMDBcdWQ1NTlcdWFjZmMgSyBcdWIzMDBcdWQ1NTlcdWM3NTggXHVjZWY0XHVkNGU4XHVkMTMwIFx1ZDA3NFx1YjdmZFx1Yzc0MCBcdWM3NzRcdWM4MDRcdWJkODBcdWQxMzAgXHViNzdjX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