import Data.Ratio
main = do
  n <- readLn
  putStrLn $ unwords $ map show $ head [
    [h,m,w] |
      h <- [3500,3499..(n`div`4)`max`1],
      let x = 4%n - 1%h,
      m <- [3500,3499..(denominator x`div`numerator x)`max`1],
      let y = x - 1%m,
      numerator y == 1,
      let w = denominator y]