Two Captains#4880

Two Captains

1 second
64 megabytes
Easy

Ships without captains, a captain without a ship...

A group of friends decided to play football. Since their skill levels differ, each can be represented by a number (the higher the number, the stronger the player). They decided to select two captains to form teams.

Initially, the captains would take turns picking players. They drew lots to determine who would pick first. However, in this system, the team of the captain who won the draw would be significantly stronger, as each player picked by this captain would be 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 (and every odd-numbered pair) of picks, the captain who won the draw picks first. For the second pair (and every even-numbered pair), the captain who lost the draw picks first.

In this revised system, it is possible that the team of the captain who lost the draw could end up stronger, assuming both captains make their selections optimally. Your task is to determine whether it is more advantageous to win or lose the draw to form a stronger team, under the assumption that both captains will choose players in a way that maximizes the total strength of their own team, regardless of the other captain's choices.

Input

The first line contains the number of players (0 < n \leq 100, and is even). The second line contains integers a_1, a_2, \ldots, a_n, representing the skill levels of the players (a_i \geq 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, 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.

Examples

Example 1

Loading
Loading