import System.IO (isEOF)
import Data.List.Split

loop rec loz = do done <- isEOF
                  if done
                    then do putStrLn $ show rec
                            putStrLn $ show loz
                            return ()
                    else do input <- getLine
                            let (r, l) = result input rec loz
                                in loop r l

result str rec loz = let [a, b, c] = map (read :: String -> Int) $ splitOn "," str
                         in if (a^2 + b^2 == c^2)
                              then (rec + 1, loz)
                              else if (a == b && b == c)
                                     then (rec, loz)
                                     else (rec, loz + 1)

main = do loop 0 0