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

ans = False
x = a[0]
y = a[1]
available = list(a[2:])
while available:
    r = x ^ y
    if r in available:
        available.remove(r)
        x = y
        y = r
    else:
        break
if not available:
    ans = x ^ y == a[0]

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