N = int(input())
a = list(map(lambda x: int(x), input().split(' ')))

a.append(a[0])

mat = []
for i in range(len(a)):
    for j in range(i+1, len(a)):
        mat.append(a[i] ^ a[j])
        # mat[i, j] = a[i] ^ a[j]
        #mat.append(row)
mat = list(set(mat))

flg = True
for _a in a:
    if _a in mat:
        continue
    else:
        print('No')
        flg = False
        break

if flg:
    print('Yes')