N = int(input())
a = list(map(int, input().split()))

if 0 in a:
    print("Yes")
    exit()

if (a[0] ^ a[N-1]) in a:
    print("Yes")
    exit()

s = set()
for i in range(N):
    for j in range(N):
        s.add(a[i] ^ a[j])

if s in a:
    print("Yes")
else:
    print("No")