mport Data.List.Split
main :: IO ()
main = do
    l1 <- getLinel :: IO [Int]
    l2 <- getLinel :: IO [Int]
    l3 <- getLinel :: IO [Int]
    if solve l1 l2 l3
        then putStrLn "Yes"
        else putStrLn "No"
    where
        getLinel :: Read a => IO [a]
        getLinel = getLine >>= return . map read . splitOn " "
        listdiff :: [Int] -> [Int] -> [Int]
        listdiff [] _ = []
        listdiff _ [] = []
        listdiff (x:xs) (y:ys) = (x-y):listdiff xs ys
        isSameElem :: [Int] -> Bool
        isSameElem [] = False
        isSameElem (x:xs) = foldr (\a b -> (a == x) && b) True xs
        solve :: [Int] -> [Int] -> [Int] -> Bool
        solve l1 l2 l3 = (isSameElem $ listdiff l1 l2) && (isSameElem $ listdiff
 l1 l3)