def read():
    N = int(input().strip())
    A = list(map(int, input().strip().split()))
    return N, A


def solve(N, A):
    xor_a = 0
    for i in range(N):
        xor_a ^= A[i]
    if N % 3 == 0:
        return 1 if xor_a == 0 else 0
    elif N % 3 == 1:
        for i in range(N):
            if xor_a ^ A[i] == 0:
                return 1
        return 0
    elif N % 3 == 2:
        for i in range(N):
            for j in range(i):
                if xor_a ^ A[i] ^ A[j] == 0:
                    return 1
        return 0
    raise ValueError()


if __name__ == '__main__':
    inputs = read()
    print('Yes' if solve(*inputs) else 'No')
