def main():
    N = int(input())
    A = [int(a) for a in input().split()]

    e = set(A)

    if len(e) == 1:
        print("No")
        exit()

    ans = A[0]
    for i in range(1, N):
        ans ^= A[i]

    if ans == 0:
        print("Yes")
    else:
        print("No")

if __name__ == "__main__":
    main()