def doMaths(one, two):
    i = max(len(one), len(two))
    ans = ""
    diffone = i - len(one)
    difftwo = i - len(two)
    nonzero = False
    for i2 in range(0, i):
        if len(one) < i - i2:
            ans += two[i2]
            nonzero = True
            continue
        if len(two) < i - i2:
            ans += one[i2]
            nonzero = True
            continue
        maths = (int(one[i2 - diffone]) + int(two[i2 - difftwo]))%2
        if not nonzero:
            if not maths == 0:
                ans += str(maths)
                nonzero = True
        else:
            ans += str(maths)
    return ans

n = int(input())
hats = input()
hatnums = hats.split(" ")
hatnums2 = []
for hat in hatnums:
    hatnums2.append(bin(int(hat))[2:])
if len(hatnums2)%2 == 0:
    print('No')
    exit()
for hatnum in hatnums2:
    for hatnum2 in hatnums2:
        if hatnum2 != hatnum:
            if not doMaths(hatnum, hatnum2) in hatnums2:
                print('No')
                exit()
print('Yes')