a=int(input())
b= list(map(int, input().split()))
b.sort()
b.append(b[0])
b.append(b[1])
d=0

for i in range(a):
    c= int(b[i]^b[i+2])
    if c!=b[i+1]:
        d += 1
        break

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