N = int(input())
a = list(map(int, input().split()))

uni = list(set(a))
if len(uni) == 1 and uni[0] == 0:
    print("Yes")
elif len(uni) == 2 and 0 in uni:
    print("Yes")
elif len(uni) == 3 and uni[0] ^ uni[1] ^ uni[2] == 0:
    print("Yes")
else:
    print("No")