import bisect


N = int(input())
a = list(map(int, input().split()))
a.sort()
for i in range(1, N):
    x = a[0]
    y = a[i]
    used = [0] * (N + 1)
    used[0] = 1
    used[i] = 1
    used[N] = 1
    for _ in range(N - 2):
        z = x ^ y
        ind = bisect.bisect_left(a, z)
        if used[ind] == 0 and a[ind] == z:
            used[ind] = 1
            x = y
            y = z
        else:
            break
    else:
        if a[0] == x ^ y:
            print("Yes")
            exit(0)

print("No")