import Data.List.Split (splitOn)
import Data.List (transpose, genericLength)

mean :: (Fractional a, Real b) => [b] -> a
mean l = (sum . map realToFrac) l / (genericLength l)

totalSalesAmount :: Integral a => [[a]] -> a
totalSalesAmount = sum . (map product)

salesQuantityAvergage :: Integral a => [[a]] -> a
salesQuantityAvergage l = round $ mean $ flip (!!) 1 $ transpose l

main :: IO ()
main = putStr . unlines . map show . (\l -> [totalSalesAmount l, salesQuantityAvergage l]) .
    map (map read) . map (splitOn ",") . lines =<< getContents