n = gets.to_s.to_i t = n t /= 2 while t.even? if t == 1 puts "-1 -1 -1" exit end c = n a = n & -n b = a ^ c puts "#{a} #{b} #{c}"