n=int(input())
a=list(map(int,input().split()))
a.sort()
ans="Yes"
for i in range(n):
  if i==n-2:
    if a[0]==a[i]^a[i+1]:
      continue
    else:
      ans="No"
  elif i==n-1:
    if a[1]==a[i]^a[0]:
      continue
    else:
      ans="No"
  else:
    if a[i+2]==a[i]^a[i+1]:
      continue
    else:
      ans="No"
print(ans)