import Control.Applicative
import Control.Monad

isRight :: [Int] -> Bool
isRight [a, b, c] =
  if a > b then
    if a > c then a^2 == b^2 + c^2
      else c^2 == a^2 + b^2
  else -- b >= a
    if b > c then b^2 == a^2 + c^2
      else c^2 == a^2 + b^2

isObtuse :: [Int] -> Bool
isObtuse [a, b, c] =
  if a > b then
    if a > c then a^2 > b^2 + c^2
      else c^2 > a^2 + b^2
  else -- b >= a
    if b > c then b^2 > a^2 + c^2
      else c^2 > a^2 + b^2

isAcute :: [Int] -> Bool
isAcute [a, b, c] =
  if a > b then
    if a > c then a^2 < b^2 + c^2
      else c^2 < a^2 + b^2
  else -- b >= a
    if b > c then b^2 < a^2 + c^2
      else c^2 < a^2 + b^2

isTriangle :: [Int] -> Bool
isTriangle [a, b, c] =
  if (a + b > c) && (b + c > a) && (a + c > b) then True
    else False

solver' :: [Int] -> [Int] -> [Int]
solver' xs [a, b, c, d] =
  if isRight xs then [a+1, b+1, c, d]
  else if isAcute xs then [a+1, b, c+1, d]
  else [a+1, b, c, d+1]

converter :: [Int] -> String
converter [a, b, c, d] = show a ++ " " ++ show b ++ " " ++ show c ++ " " ++ show d

solver :: [Int] -> IO()
solver counter = do
  input <- (map (read :: String -> Int)) . words <$> getLine
  if isTriangle input then do
    let counter' = solver' input counter
    solver counter'
  else putStrLn $ converter counter

main :: IO()
main = solver [0, 0, 0, 0]
--  let counter = [0, 0, 0, 0]
--  [a, b, c] <- (map (read :: String -> Int)) . words <$> getLine
--  print $ solver' [a, b, c] [0, 0, 0, 0]

