import qualified Data.Vector.Unboxed as VU
import qualified Data.Vector.Unboxed.Mutable as VUM
import qualified Data.ByteString.Char8 as B
import Data.Char
import Control.Monad

count :: Int -> Int
count n = loop n 0
    where
        loop n i
            | n `rem` 2 == 0 = loop (n `quot` 2) (i + 1)
            | otherwise = i 

classify :: VUM.IOVector Int -> Int -> IO ()
classify vec n
    | c == 0 = VUM.modify vec (+1) 0
    | c == 1 = VUM.modify vec (+1) 1
    | c >= 2 = VUM.modify vec (+1) 2
    | otherwise = return ()
    where
        c = count n

main = do
    n <- readLn :: IO Int
    xs <- VU.unfoldrN n (B.readInt . B.dropWhile isSpace) <$> B.getLine
    res <- VUM.replicate 3 0
    forM_ [0..n-1] $ \i -> classify res (xs VU.! i)
    r <- VUM.read res 0
    s <- VUM.read res 1
    t <- VUM.read res 2
    
    if (s == 0)
        then putStrLn $ if t >= (r-1) then "Yes" else "No"
        else putStrLn $ if t >= r then "Yes" else "No"