n = int(input())
li = list(map(int, input().split()))


find = False
# 2こめ
for i, x in enumerate(li[1:]):
    result = [li[0]]
    
    result.append(x)
    not_used = li[1:]
    not_used.pop(i)
    
    # 3こめ~
    for j in range(n - 2):
#         print(result)
        nex = result[-1]^result[-2]
#         print(nex, not_used)
        if nex in not_used:
            idx = not_used.index(nex)
            result.append(nex)
            not_used.pop(idx)
        else:
            break
    if len(result) != n:
        continue
    else:
        print("Yes")
        find = True
        break

if not find:
    print("No")
        
        