n=int(input())
a_list=list(map(int,input().split()))
a=set(a_list)
if len(a)!=3:
  print("No")
  exit()
a=list(a)
count_a0=a_list.count(a[0])
count_a1=a_list.count(a[1])
count_a2=a_list.count(a[2])
print(a)
if count_a0!=count_a1 or count_a1!=count_a2 or count_a2!=count_a0:
  print("No")
  exit()
if a[0]==a[1]^a[2] and a[1]==a[0]^a[2] and a[2]==a[1]^a[0]:
  print("Yes")
else:
  print("No")