n = int(input())
*a, = map(int, input().split())

for i in range(n):
    for j in range(i+1, n):
        x = a[i]
        y = a[j]
        if x ^ y not in a:
            print("No")
            exit()
else:
    print("Yes")
