import sys

input = sys.stdin.readline


def main():
    N = int(input())
    A = list(map(int, input().split()))

    xor_all = 0
    zero_cnt = 0
    for a in A:
        xor_all = xor_all ^ a
        zero_cnt += 1 if a == 0 else 0

    if xor_all == 0:
        if zero_cnt > 0:
            if zero_cnt * 2 == N - zero_cnt:
                ans = "Yes"
            else:
                ans = "No"
        else:
            ans = "Yes"
    else:
        ans = "No"

    print(ans)


if __name__ == "__main__":
    main()
