n = int(input())
a = list(map(int,input().split()))
#n = 3
#a = [1,2,3]
if n >=4:
  if a.count(0) == n:
    print("yes")
  else :
    print("no")
else:
  if a[0]^a[1] == a[2] and a[1]^a[2] == a[0] and a[2]^a[0] == a[1]:
    print("yes")