from sys import stdin
N = int(stdin.readline().rstrip())
data = [int(x) for x in stdin.readline().rstrip().split()]
flag = True
if len(set(data)) != 3:
    flag = False
syugo = list(set(data))
if syugo[0]^syugo[1] != syugo[2]:
    flag = False

if flag:
    print("Yes")
else:
    print("No")