n = gets.to_s.to_i if n.to_s(2).count("1") <= 1 puts "-1 -1 -1" exit end a = n b = n c = 0 30.times do |i| if n[i] == 1 c |= 1 << i a &= ~(1 << i) break end end puts [a, b, c].join(" ")