n = int(input())

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

c = [a[0]]

a.remove(c[0])

result = 'No'
for i in a:
    a_list = a.copy()
    a_list.remove(i)
    d = c[0]
    f = i
    while True:
        g = d ^ f
        if g in a_list:
            a_list.remove(g)
            d = f
            f = g
        else:
            break
            
        if len(a_list) == 0:
            if d ^ f == c[0]:
                result = 'Yes'
            break

print(result)