N = int(input())
A = list(map(int,input().split()))

even = [0]*10 #偶数
odd = [0]*10#奇数

for i in range(N):
    BIT = bin(A[i])

    for j in range(10):

        UnderThree = bin(0b0000000111 & int(BIT,0))
        UTten = int(UnderThree,0)

        if UTten % 2 == 0:
            even[j] += 1
        else:
            odd[j] += 1

        if int(BIT,0) > 7:
            tmp = int(BIT,0)
            BIT = bin(tmp >> 3)
        else:
            break

Judge = True

for b in range(10):
    if not(2*even[b] == odd[b] or odd[b] == 0):
        Judge = False

if Judge:
    print("Yes")
else:
    print("No")


# 111
# 011
# 100
# 110
# 101
# 100
# 101
# 000
# 000
# 000