import Data.List
import Control.Applicative

data Tri = NotT | SharpT | RightT | DullT

typeOfTri :: [Int] -> Tri
typeOfTri [a, b, c]
  | c > a+b = NotT
  | x == LT = SharpT
  | x == EQ = RightT
  | x == GT = DullT
  where x = compare (b*b+a*a) (c*c)

loop :: Int -> Int -> Int -> Int -> IO ()
loop a b c d = do
  tri <- sort . fmap read . words <$> getLine :: IO [Int]
  case typeOfTri tri of
    NotT   -> putStrLn . unwords $ show <$> [a, b, c, d] 
    SharpT -> loop (a+1) b (c+1) d
    RightT -> loop (a+1) (b+1) c d
    DullT  -> loop (a+1) b c (d+1)

main :: IO ()
main = loop 0 0 0 0
  
