import numpy as np
import sys
N = int(input('>>'))
a = np.zeros(N,dtype='int')

if N % 3 != 0:
    print('No')
    sys.exit()

for i in range(N):
    a[i]=input('>>')

datas = np.unique(a)
if len(datas) != 3:
    print('No')
    sys.exit()

ans = 'Yes'
for data in datas:
       if (a==data).sum() != N/3:
           ans = 'No'

if datas[0]^datas[1]^datas[2] !=0:
    ans = 'No'

print(ans)
       
       
