# coding: utf-8
n = int(input())
a_list = list(map(int,input().split()))
ans_list = []

#a0
ans_flag = 0
first_ans = a_list[0]
for i in range(1,n-1):
    if ans_flag == 1:
        break
    for j in range(i+1,n):
        ans = a_list[i] ^ a_list[j]
        #print(ans)
        if ans == a_list[0]:
            ans_flag = 1
            fin_ans = a_list[j]
            sec_ans = a_list[i]
            a_list.remove(sec_ans)
            a_list.remove(fin_ans)
            a_list.remove(first_ans)
            ans_list.append(first_ans)
            ans_list.append(sec_ans)
            break
        
if ans_flag == 0:
    print("No")
    quit()

for i in range(n-2):
    ans = ans_list[i] ^ ans_list[i+1]
    if i == n-3:
        if ans == fin_ans:
            print("Yes")
            quit()
    
    if ans in a_list:
        ans_list.append(ans)
        a_list.remove(ans)
    else:
        print("No")
        quit()
    