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

def all_zero(a):
    for e in a:
        if e != 0:
            return False
    return True

if N != 3:
    if all_zero(a):
        print("Yes")
    else:
        print("No")
else:
    lst = [0,1,2]
    p = itertools.permutations(lst, 3)
    for perm in p:
        good_perm = True
        for i in range(3):
            if a[perm[(i + 1) % 3]] != a[perm[i]] ^ a[perm[(i + 2) % 3]]:
                good_perm = False
        if good_perm:
            yes = True
            break
    if yes:
        print("Yes")
    else:
        print("No")