Time Limit: 5000/2000 MS (Java/Others)
Memory Limit: 32768/32768 K (Java/Others)
Given n positive integers, is it possible to divide them into pairs so that the sum of each pair is the same?
The input contains several test cases. The first line of each case contains a single integer n (2 ≤ n ≤ 100). The second line contains n positive integers not greater than 1000. These numbers are sorted in non-decreasing order. The last case is followed by a single zero, which should not be processed.
For each case, output ‘Yes’ or ‘No’ depending on whether or not the pairing is possible.
2006 Asia Regional Xi-An （Preliminary）