N = int(input())
a = list(map(int,input().split()))
t = 0
for i in range(N):
    t ^= a[i]
if t != 0:
    print("No")
else:
    if N == 3:
        print("Yes")
    else:
        print("Yes" if all([0 == x for x in a]) else "No")