A tug of war is to be arranged at the local office picnic. All participants must be divided into two teams. Each person must be on one team or the other. The number of people in the teams may not differ by more than . The total weights of the two teams should be as close as possible.
The first line contains , the number of people at the picnic (1 \leq n \leq 100). Each of the following lines contains a single integer between and — the weight of each person.
Output a single line with two integers: the total weight of the first team and the total weight of the second team. If the numbers are different, print the smaller one first.
Example 1