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

s = []

for i in range(n):
    for j in range(n):
        if not i == j:
            s.append(a[i] ^ a[j])

#print(a)
#print(s)

ans_flag = True
for i in range(n):
    sub_flag = False
    for j in range(len(s)):
        if a[i] == s[j]:
            s[j] = -1
            sub_flag = True
            break
    if sub_flag == False:
        ans_flag = False
        break

#print(a)
#print(s)

if ans_flag:
    print('Yes')
else:
    print('No')
