n = int(input())
a = list(map(int, input().split()))
#a.sort()

found = False
for i in range(n - 1):
    found = False
    for j in range(i + 1, n):
        tgt = a[i] ^ a[j]
        if a.count(tgt) > 0:
            found = True
            break
    if not found:
        break
if found:
    print("Yes")
else:
    print("No")
