import java.io.File;
import java.io.PrintWriter;
import java.util.Scanner;

import static java.lang.Math.abs;
import static java.lang.Math.pow;

public class Main {
    private static final int MAX = 32768;

    public static void main(String[] arguments) throws Exception {
        new Main().run();
    }

    private void run() throws Exception {
        Scanner scanner = new Scanner(new File("Input.txt"));
        PrintWriter printWriter = new PrintWriter(new File("Output.txt"));

        long a = scanner.nextLong();
        long b = scanner.nextLong();
        long c = scanner.nextLong();
        long d = scanner.nextLong();

        scanner.close();

        if (abs(a) >= MAX || abs(b) >= MAX || abs(c) >= MAX || abs(d) >= MAX) {
            printWriter.close();

            throw new Exception("The numbers must be less than " + MAX);
        }

        for (int i = -100; i <= 100; i++) {
            if (a * pow(i, 3) + b * pow(i, 2) + c * i + d == 0) {
                printWriter.print(i + " ");
            }
        }

        printWriter.println();
        printWriter.close();
    }
}
