main :: IO ()
main = do
  let max = round $ 10 ** 9 :: Int

  s' <- getLine
  let s = read s' :: Int

  let a = floor (sqrt (fromIntegral s)) + 1 :: Int
      x1 = 0 :: Int
      y1 = 0 :: Int
      y2 = 1 :: Int
      x2 = a
      y3 = a
      x3 = a * a - s

  putStrLn $ show x1 ++ " " ++ show y1 ++ " " ++ show x2 ++ " " ++ show y2 ++ " " ++ show x3 ++ " " ++ show y3
