M. XOR Almost Everything
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Walk_alone has a sequence $$$a$$$ of length $$$n$$$. He can do the following operations for arbitrary times (possibly zero):

  • Select an index $$$x$$$ and an integer $$$y$$$ ($$$1 \leq x \leq n, 0 \leq y \lt 2^{30}$$$);
  • For all index $$$i$$$ such that $$$i \neq x$$$, change $$$a_i$$$ to $$$a_i \oplus y$$$, where $$$\oplus$$$ denotes bitwise XOR.

Note that Walk_alone can select different $$$y$$$ in different operations.

Now he wants to know if he can change all numbers in the sequence to $$$0$$$.

Input

The first line contains a integers $$$n\ (1 \leq n \leq 10^5)$$$, the length of sequence $$$a$$$.

The next line contains $$$n$$$ integers $$$a_1, a_2, \dots , a_n \ (0 \leq a_i \lt 2^{30})$$$, indicating the elements in $$$a$$$.

Output

Print "$$$\mathtt{YES}$$$" (without quotes) if Walk_alone can change all numbers in the sequence to $$$0$$$, otherwise print "$$$\mathtt{NO}$$$".

Examples
Input
5
5 4 2 1 2
Output
YES
Input
5
9 3 5 6 1
Output
NO