#include #include #include #include #include constexpr int MOD = 100003; struct modint { int n; modint(int n = 0) : n(n) {} }; modint operator+(modint a, modint b) { return modint((a.n += b.n) >= MOD ? a.n - MOD : a.n); } modint operator-(modint a, modint b) { return modint((a.n -= b.n) < 0 ? a.n + MOD : a.n); } modint operator*(modint a, modint b) { return modint(1LL * a.n * b.n % MOD); } modint &operator+=(modint &a, modint b) { return a = a + b; } modint &operator-=(modint &a, modint b) { return a = a - b; } modint &operator*=(modint &a, modint b) { return a = a * b; } int main() { long long a, b, c; std::cin >> a >> b >> c; std::vector check(MOD); for (int i = 0; i < MOD; i++) { modint x = i; if ((x * x * x + a * x * x + b * x + c).n == 0) { check[i] = true; } } std::set ans; for (long long i = 0; i < MOD; i++) { if (!check[i]) continue; for (long long j = i; j <= 1000000000; j += MOD) { __int128 x = j; __int128 y = -x; if (x * x * x + a * x * x + b * x + c == 0) ans.insert(x); if (y * y * y + a * y * y + b * y + c == 0) ans.insert(y); } } for (long long x : ans) { std::cout << x << ' '; } }