import Control.Applicative
import Data.Ratio

main = do
  n <- readLn :: IO Int
  as <- map read . words <$> getLine :: IO [Int]
  bs <- map read . words <$> getLine :: IO [Int]
  let k = sum bs - sum as
  
  print $ solve as bs k

  where
    solve as bs k
      | k < 0 = False
      | otherwise = aux_a as bs 0 0 k

    aux_a as bs ka kb k
      | ka + ka1 > k = False
      | ka1 == 0 = if (k-ka)*2 == (k-kb) then True else False
      | otherwise = aux_b as1 bs (ka+ka1) kb k
      where
        as1 = zipWith (\a b -> if a<b then a+(ceiling $ (b-a) % 2)*2 else a) as bs
        ka1 = sum $ zipWith (\a a1 -> (a1 - a) `div` 2) as as1

    aux_b as bs ka kb k
      | kb + kb1 > k = False
      | kb1 == 0 = if (k-ka)*2 == (k-kb) then True else False
      | otherwise = aux_a as bs1 ka (kb+kb1) k
      where
        bs1 = zipWith (\a b -> if a>b then a else b) as bs
        kb1 = sum $ zipWith (\b b1 -> b1 - b) bs bs1
