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