import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    n=int(input())
    A=[int(_) for _ in input().split()]
    if n==3 and A[0]^A[1]==A[2]:
        print("Yes")
    else:
        print("No")

if __name__=='__main__':
    main()