lib C
  fun strtoll(s : UInt8*, p : UInt8**, b : Int32) : Int64
end

class String
  def to_i64
    C.strtoll(self, nil, 10)
  end
end

n = read_line.to_i64
a = 2i64**(0..31).find { |i| n.bit(i) == 1 }.not_nil!
puts [n, a, n - a].join(' ')