N = int(input())
A = [int(a) for a in input().split()]
c = N-1
A.sort()
while c > 0:
    num = A[0]^A[c]
    pre_num = A[c]
    B = [A[0],A[c],num]
    while len(B) < N:
        box = num
        num = num^pre_num
        pre_num = box
        B.append(num)
        if pre_num not in A:
            break
    B.sort()
    if A == B:
        break
    c -= 1
if c > 0:
    print("Yes")
else:
    print("No")