n = int(input())
a = [int(i) for i in input().split()]
a.sort()
ans = "Yes"
for i in range(n):
    if i < n-2:
        if a[i+2] == a[i+1] ^ a[i]:
            continue
        else:
            ans = "No"
            break
    elif i == n-2:
        if a[0] == a[i+1] ^ a[i]:
            continue
        else:
            ans = "No"
            break
    elif i == n-1:
        if a[1] == a[i] ^ a[0]:
            continue
        else:
            ans = "No"
            break
print(ans)