N = int(input())
ls = list(map(int,input().split()))
flag = "No"
for i in range(0,N-1):
    if ls[i]*ls[i+1] % 4 == 0:
        if ls[i] == 1 or ls[i+1] == 1:
            flag = "Yes"
            break
print(flag)