import itertools
n = int(input())
inp = list(map(int, input().split()))


clist = list(itertools.permutations(inp))



lenC = len(clist)

Noflag = 0
for i in range(lenC):
  Noflag=0
  for j in range(n):
    if j == 0:
      if clist[i][n-1]^clist[i][j+1] != clist[i][j]:
        Noflag=1
        break
    elif j==n-1:
      if clist[i][j-1]^clist[i][0] != clist[i][j]:
        Noflag=1
        break
    else:
      if clist[i][j-1]^clist[i][j+1] != clist[i][j]:
        Noflag=1
        break
  if Noflag==0:
    break

if Noflag ==0:
  print("Yes")
else:
  print("No")

