from collections import Counter

n = int(input())

A = [int(i) for i in input().split()]
counts = Counter(A)

# case3: nが3の倍数で、counts == x: 2*n//3,0: n//3 を満たす

if len(counts.items()) == 2 and n % 3 == 0:
    if counts.most_common()[1][0] == 0 and counts.most_common()[1][1] == n // 3:
        print("Yes")
        quit()
    else:
        print("No")
        quit()

tmp = 0
for a in A:
    tmp ^= a
if tmp == 0:
    print("Yes")
else:
    print("No")
