import sys
input = sys.stdin.readline


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


import collections

c = collections.Counter(a)

klist = list(c.keys())

if not len(klist) == 3:
    print('No')
    sys.exit()

vlist = list(c.values())
if not (vlist[0] == vlist[1] and vlist[1] == vlist[2]):
    print('No')
    sys.exit()

if not (klist[0] ^ klist[1] == klist[2]):
    print('No3')
    sys.exit()

print('Yes')

