def main():
    N = int(input())
    A = [int(i) for i in input().split()]
    if set(A) == {0}: return print("Yes")
    if N > 3: return print("No")
    if A[0] ^ A[2] == A[1] and A[1] ^ A[2] == A[0] and A[0] ^ A[1] == A[2]:
        print("Yes")
    else:
        print("No")
if __name__ == '__main__':
    main()