program name
    use,intrinsic :: iso_fortran_env
    implicit none
    integer(int32):: n,i,mul4=0, odd=0
    integer(int32), allocatable:: a(:)

    read*, n
    allocate(a(n))
    read*, a(:)
    do i=1,n
        if (btest(a(i),0))then
            odd=odd+1
        else if (mod(a(i),4) == 0) then
            mul4=mul4+1
        end if
    end do

    if (mul4 >= odd) then
        print'(a)', 'Yes'
    else
        if (mul4+1 == odd .and. mul4+odd == n) then
            print'(a)', 'Yes'
        else
            print'(a)', 'No'
        end if
    end if
end program name