require 'prime' A,B,C=gets.split.map(&:to_i) c=C.prime_division.map{|n,p|(0..p).map{|i|n**i}} puts c.shift.product(*c).map{|_|_.reduce(1,:*)}.select{|x|x**3+A*x**2+B*x+C==0}.sort