E. Cultural Dissonance
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Batyr and Mazen decided to go to a popular place where they cook wok and offer $$$n$$$ different toppings. Each topping changes the taste of the wok by $$$a_i$$$, which can also be a negative number. Wok without any toppings has a taste of $$$0$$$.

They want to try all possible woks, which is a total of $$$2^n$$$. Batyr wants to write down a list of the order in which they will try all the woks. Then he will share this list with Mazen. However, since Mazen's native language is Arabic, he will read this list from right to left. This means that the first wok in Batyr's list will be the last in Mazen's list and vice versa.

To avoid disagreements or conflicts, Batyr wants to create the list in such a way that the woks they will try at the same time always have the same taste for both him and Mazen. In other words, Batyr needs to ensure that the tastes of the woks are identical when reading the list from left to right and from right to left.

Determine if Batyr can create such a list.

Input

The first line contains a single integer $$$n$$$ ($$$1 \leq n \leq 30$$$) - the number of toppings.

The second line contains $$$n$$$ integers $$$a_1, \ldots, a_n$$$ ($$$-10^9 \leq a_i \leq 10^9$$$) - the tastes of the toppings.

Output

If it is possible to create a list, print 'YES'. Otherwise, print 'NO'.

Examples
Input
2
1 -2
Output
NO
Input
3
-1 0 1
Output
YES
Note

In the first example, there are only $$$4$$$ possible woks:

  • Wok without toppings with a taste of $$$0$$$.
  • Wok with the first topping with a taste of $$$1$$$.
  • Wok with the second topping with a taste of $$$-2$$$.
  • Wok with both toppings and a taste of $$$-1$$$.

It can be shown that there is no order in which the tastes of the woks would be identical when reading the list from left to right and from right to left.