n=int(input())
a=set(map(int,input().split()))
if len(a)==3:
    a = list(a)
    if a[0]^a[1]^a[2]==0:
        print('Yes')
    else:
        print('No')
elif len(a)==2:
    print('Yes')
else:
    print('No')