N = int(input())
a = list(map(int, input().split()))
ans = "Yes"
flag = 0
for k in range(N):
    for i in range(N - 1):
        if i == k:
            continue
        for j in range(i + 1, N):
            if j == k:
                continue
            if (a[i] ^ a[j]) == a[k]:
                flag = 1
                break
        if flag == 1:
            break
    if flag != 1:
        ans = "No"
        break
print(ans)