N = int(input())
A = list(map(int, input().split()))

def sol() :
    for i in range(N) :  # 先頭
        for j in range(i+1, N) :  # 2頭目
            numbers = [0] * (N + 2)
            numbers[0] = A[i]
            numbers[1] = A[j]
            for k in range(2, N+2) :
                numbers[k] = numbers[k-1] ^ numbers[k-2]

            if numbers[0] == numbers[-2] and numbers[1] == numbers[-1] :
                return numbers[:-2]
    return -1

ans = sol()

if ans == -1 :
    print('No')
else :
    ans.sort()
    A.sort()
    if ans == A :
        print('Yes')
    else :
        print('No')