from collections import Counter

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

if len(set(a)) == 1 and a[0] == 0:
    print('Yes')
elif N % 3 == 0:
    res = 0
    for i in range(N):
        res ^= a[i]
    l = [*Counter(a).values()]
    if res == 0:
        if len(l) == 3 and l[0]^l[1]^l[2] == 0 and len(set(l)) == 1:
            print('Yes')
        else:
            print('No')
    else:
        print('No')
else:
    print('No')