N = int(input())
a = [int(i) for i in input().split()]

a.sort()
for i in range(N-1):
    if a[i-1] ^ a[i+1] == a[i]:
        continue
    else:
        print("No")
        exit()

if a[N-2] ^ a[0] != a[N-1]:
    print("No")
    exit()

print("Yes" if flag else "No")
