import bisect

def search(a, x):
    i = bisect.bisect_left(a, x)
    if i != len(a) and a[i] == x:
        return i
    return -1

def check(l1, l2, a):
    x = l1
    a = a[::]
    while 0 < len(a):
        ni = search(a, (l1^l2))
        if ni < 0:
            return False
        l1 = l2
        l2 = a.pop(ni)
    return (l1 ^ l2) == x

def main():
    seen = set()
    n = int(input())
    a = sorted(list(map(int, input().split())))
    l1, a = a[0], a[1:]
    for i in range(len(a)):
        if (l1, a[i]) in seen:
            break
        b = a[::]
        l2 = b.pop(i)
        if check(l1, l2, b):
            print('Yes')
            return
        seen.add((l1, l2))
        seen.add((l2, l1))
    print('No')

main()
