import sys

def main():
    n = int(input())-1
    nums = list(map(int,input().split()))
    bins = []
    for num in nums:
        bins.append(int(bin(num)[2:]))

    #print(bins)
    #[1(0), 10(1), 100(2), 1000(3)]:No
    #[1(0), 10(1), 11(2)]:Yes
    if int(str(sum(bins)).replace("2","0")) == 0:
        print("Yes")
    elif int(str(sum(bins)).replace("2","0")) == 10:
        print("Yes")
    else:
        print("No")

main()