Two Captains
Ships without captains, a captain without a ship...
A group of friends decided to play football. Since they have varying skill levels, each represented by a number (where a higher number indicates a stronger player), they decided to select two captains to form teams.
Initially, the captains were to take turns picking players. They drew lots to decide who would pick first. However, this method resulted in the team of the captain who won the draw being significantly stronger, as each player picked by this captain was at least as strong as the corresponding player picked by the other captain.
To make the selection process fairer, they decided that captains would still alternate picks, but with a twist: for the first pair of picks (and every odd-numbered pair), the captain who won the draw would pick first. For the second pair (and every even-numbered pair), the captain who lost the draw would pick first.
In this revised system, it's possible that the team of the captain who lost the draw could end up stronger, assuming both captains choose optimally. Your task is to determine whether it is more advantageous to win or lose the draw to form a stronger team, given that both captains will choose players in a way that maximizes their team's strength, regardless of the other captain's choices.
Input
The first line of the input specifies the number of players n (0 < n ≤ 100, and n is even). The second line contains n integers a_i, representing the skill levels of the players (a_i ≥ 0). The captains themselves are not included among these players, and their skill levels are zero. All numbers in the input are integers, and their total sum does not exceed 10^9.
Output
On the first line of the output, print YES if the team of the captain who won the draw will be stronger, or NO if it will not be. On the second line, print the skill level of the team of the captain who won the draw and the skill level of the team of the captain who lost the draw, separated by a space. The skill level of a team is the sum of the skill levels of all its players.