n = int(input())
aa = list(map(int, input().split()))

if n >= 4:
    if all(map(lambda x: x == 0, aa)):
        print('Yes')
    else:
        print('No')
else:
    a, b, c = aa
    if a == b ^ c:
        print('Yes')
    else:
        print('No')
    