fun main() { val builder = StringBuilder() val n = readInputLine().toInt() var a = 0 var b = 0 var addA = true for (i in 0 until 30) { if ((n shr i) and 1 == 1) { if (addA) { a = a or (1 shl i) } else { b = b or (1 shl i) } addA = !addA } } if (b != 0) { builder.appendln("$a $b $n") } else { builder.appendln("-1 -1 -1") } print(builder.toString()) } fun readInputLine(): String { return readLine()!! }