시간 제한 메모리 제한 제출 정답 맞은 사람 정답 비율
1 초 256 MB 29 22 16 80.000%

문제

Given a sequence $A_{1...n}$ of distinct integers, you need to answer whether there exist four indices $x, y, z, w$ such that $1 \le x < y < z < w \le n$ and $A_x \oplus A_y \oplus A_z \oplus A_w = 0$.

Recall that $x \oplus y$ means the bitwise exclusive-or between $x$ and $y$, sometimes expressed as $x \mathrm{xor} y$.

입력

The first line contains a single integer $n$ ($4 \le n \le 10^5$).

The second line contains $n$ integers $A_{1...n}$ ($0 \le A_i \le 10^5$). It is guaranteed that all $A_i$ are distinct.

출력

Output "Yes" if there are four indices satisfying the conditions, or "No" otherwise.

예제 입력 1

5
1 2 3 4 5

예제 출력 1

Yes

예제 입력 2

5
1 2 4 8 16

예제 출력 2

No

예제 입력 3

5
1 3 4 8 9

예제 출력 3

No