import collections

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

C = collections.Counter(a)
if len(C) != 3:
    print("No")
    exit()

e = list(C.keys())
print(((e[0] ^ e[1]) == e[2]) and "Yes" or "No")
