
import itertools

def solve(A):
    """
    >>> solve([1,2,3])
    Yes
    """
    if len(A) > 4:
        if all([i == 0 for i in A]):
            print("Yes")
        else:
            print("No")
    else:
        if (A[0] ^ A[1] ^ A[2]) == 0:
            print("Yes")
        else:
            print("No")


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


def _test():
    import doctest
    doctest.testmod()


if __name__ == "__main__":
    import sys
    argv = sys.argv
    if len(sys.argv) == 1:
        # no option
        main()
    elif sys.argv[1] == "-t":
        _test()
    else:
        input = open(sys.argv[1]).buffer.readline