N = int(input())
a = [int(x) for x in input().split()]
a = sorted(a)
a.append(a[0])
ans = 0
for i in range(1, N):
    if a[i - 1] ^ a[i + 1] != a[i]:
        ans = 1
        break
if a[1] ^ a[N - 1] != a[0]:
    ans = 1
if ans == 0:
    print("Yes")
else:
    print("No")
