n = int(input())
s = list(map(int, input().split()))

res = set()
for i in range(n - 1):
    for j in range (i + 1, n):
        res.add(s[i] ^ s[j])

ref = set(s)
print("Yes" if all(c in res for c in ref) else "No")
