std_n = int(input())
std_set = set(map(int, input().split()))

if len(std_set) == 3:
    a, b, c = tuple(std_set)
    if int(str(int(format(a, "b")) ^ int(format(b, "b"))), 2) == c:
        print("Yes")
    else:
        print("No")
else:
    print("No")
