QOJ.ac

QOJ

시간 제한: 2 s 메모리 제한: 64 MB 총점: 100

#23779. Contest

통계

The other day, an online programming contest was held. The computer clubs of W University and K University have long been rivals, and they decided to use this contest to determine which of the two is superior.

This time, $10$ people from each of these $2$ universities participated in the contest. After a long discussion, they decided that out of the $10$ participants from each university, the sum of the scores of the top $3$ highest-scoring participants would be taken as that university's score.

Given the score data of the participants from W University and K University, write a program to calculate the score of each university.

Input

The input consists of $20$ lines. Lines $1$ through $10$ contain integers representing the scores of the participants from W University, and lines $11$ through $20$ contain integers representing the scores of the participants from K University. Each of these integers is at least $0$ and at most $100$.

Output

Output the score of W University and the score of K University in this order, separated by a space.

Examples

Input 1

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

Output 1

66 61

Input 2

17
25
23
25
79
29
1
61
59
100
44
74
94
57
13
54
82
0
42
45

Output 2

240 250

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.