import java.math.BigInteger; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Scanner; public class Main { public static void main(String[] args) { new Main().run(); } static long time = 0; public void run() { Scanner sc = new Scanner(System.in); long A = sc.nextLong(); long B = sc.nextLong(); long C = sc.nextLong(); BigInteger a = BigInteger.valueOf(A); BigInteger b = BigInteger.valueOf(B); BigInteger c = BigInteger.valueOf(C); BigInteger MOD = BigInteger.valueOf(33331); A %= 33331; B %= 33331; C %= 33331; ArrayList ans = new ArrayList<>(); for (long i = 0; i < 33331; ++i) { if (f(A, B, C, i, 33331) % 33331 == 0) { for (long j = -33331L * 33331L; j < 33331L * 33331L; j += 33331) { long v = i + j; if (f(a, b, c, BigInteger.valueOf(v)).equals(BigInteger.ZERO)) ans.add(v); } } } Collections.sort(ans); for (int i = 0; i < ans.size(); ++i) { System.out.print(ans.get(i) + (i == ans.size() - 1 ? "\n" : " ")); } } BigInteger f(BigInteger a, BigInteger b, BigInteger c, BigInteger v) { BigInteger ans = new BigInteger("0"); ans = ans.add(v.multiply(v).multiply(v)); ans = ans.add(v.multiply(v).multiply(a)); ans = ans.add(v.multiply(b)); ans = ans.add(c); return ans; } long f(long a, long b, long c, long v, long MOD) { long ans = 0; ans = v * v % MOD * v + a * v % MOD * v; ans %= MOD; ans += v * b; ans += c; ans %= MOD; return ans; } static void tr(Object... objects) { System.out.println(Arrays.deepToString(objects)); } }