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()

for i in range(N):
    for j in range(N):
        if (a[i] ^ a[j]) in a:
            print("Yes")
            exit()
        j += 1

print("No")