find4 cs a
    | search < 0 = [-1,-1,-1,-1]
    | otherwise = [a] ++ bs
    where
        bs = zipWith (-) cs [a,a,a]
        search = foldl1 (*) bs

solve c1s c2s c3s i
    | i > 100 = "No"
    | concat [c1s,c2s,c3s] `elem` res' = "Yes"
    | otherwise = solve c1s c2s c3s (i+1)
    where
        ab = find4 c1s i
        [a1,b1,b2,b3] = find4 c1s i
        a2s = zipWith (-) c2s [b1,b2,b3]
        a3s = zipWith (-) c3s [b1,b2,b3]
        res x y = (pure (+) <*> [a1,x,y] <*> [b1,b2,b3])
        res' = pure res <*> a2s <*> a3s

main = do
    c1s <- map read . words <$>  getLine
    c2s <- map read . words <$>  getLine
    c3s <- map read . words <$>  getLine
    putStrLn $ solve c1s c2s c3s 0