Coin Stacks
문제
A and B are playing a collaborative game that involves stacks of coins, numbered from to . Every round of the game, they select a nonempty stack each, but they are not allowed to choose the same stack. They then remove a coin from both the two selected stacks and then the next round begins.
The players win the game if they manage to remove all the coins. Is it possible for them to win the game, and if it is, how should they play?
입력
The first line of input contains an integer (), the number of coin stacks. Then follows a line containing nonnegative integers , where is the number of coins in the 'th stack. The total number of coins is at most .
출력
If the players can win the game, output a line containing "yes", followed by a description of the moves. Otherwise output a line containing "no". When describing the moves, output one move per line, each move being described by two distinct integers and (between and ) indicating that the players remove a coin from stacks and . If there are several possible solutions, output any one of them.
예제
예제 1
3 1 4 3
yes 1 2 2 3 2 3 2 3
예제 2
3 1 1 1
no