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

f = True

a_list.sort()

for i in range(N):
    a1 = a_list[i]
    a2 = a_list[(i + 1) % N]
    a3 = a_list[(i + 2) % N]
    if a1 ^ a3 == a2:
        continue
    else:
        f = False

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