import itertools

def check(a):
    for i in range(1, n+1):
        if a[i-1]^a[i+1] != a[i]:
            break
    else:
        return True
    return False
        
n = int(input())
a = [int(i) for i in input().split()]
b = map(list, itertools.permutations(a[:-1]))
for x in b:
    x = [a[-1]] + x + [a[-1], x[0]]
    print(x)
    if check(x) == True:
        print('Yes')
        break
else:
    print('No')