Олимпиадный тренинг

Задача 38795. Ascending Equation


Given a function \(z(x) = ax^3 + bx^2 + cx + d\). For the given numbers a, b, c and d, print all x integer values code> from the range from 0 to 1000, in which the function z(x) takes the value zero.

Input
The program receives 4 numbers as input: a, b, c and d. Each number is written on a separate line.

Imprint
Print all the x values ​​that satisfy the task condition in ascending order. 
 
Examples
# Input Output
1 1
-5
6
0
0 2 3