import Data.Maybe
import qualified Data.ByteString.Char8 as B
main=putStrLn.solve.map(fst.fromJust.B.readInt).B.words=<<B.getContents
solve(n:as)=if(c+if b/=1 then 0 else 1)-a*2<=0 then"Yes"else"No"
  where(a,b,c)=foldr f(0,0,0)$take n as
f v(a,b,c)
  |v`mod`4==0=(a+1,b,c)
  |v`mod`2==0=(a,b+1,c)
  |otherwise=(a,b,c+1)