n = int(input())
a = list(map(int, input().split()))
if n == 3:
    x,y,z = a[0],a[1],a[2]
    if x^y == z and y^z == x and z^x == y:
        print("Yes")
    else:
        print("No")
else:
    a = list(set(a))
    if a == [0]:
        print("Yes")
    else:
        print("No")