Given a set of () positive integers, you are supposed to partition them into two disjoint sets and of and numbers, respectively. Let and denote the sums of all the numbers in and , respectively. You are supposed to make the partition so that is minimized first, and then is maximized.
Input Specification
Each input file contains one test case. For each case, the first line gives an integer (), and then positive integers follow in the next line, separated by spaces. It is guaranteed that all the integers and their sum are less than .
Output Specification
For each case, print in a line two numbers: and , separated by exactly one space.