#include #define FOR(i,bg,ed) for(ll i=(bg);i<(ed);i++) #define REP(i,n) FOR(i,0,n) #define MOD 1000000007 //#define int long long using namespace std; typedef long long ll; typedef vector> mat; const int INF = 1e9; signed main() { ll A, B, C, X, Y, Z; cin >> A >> B >> C; for (X=-1000000; X<=1000000; X++) { if ((__int128_t)X*X*X + (__int128_t)A*X*X + (__int128_t)B*X + C == 0) { break; } } if (X == 0) { C = B; B = A; } else { B = A + X; C = -C / X; } double D = max(0.0, (double)B*B - 4*C); for (Y=(-B+sqrt(D))/2-2; Y<=(-B+sqrt(D))/2+2; Y++) { Z = -B - Y; if (abs(Y) >= 1000000000) continue; if (abs(Z) >= 1000000000) continue; if (Y * Z != C) continue; if (Y + Z != -B) continue; break; } if (X > Y) swap(X, Y); if (Y > Z) swap(Y, Z); if (X > Y) swap(X, Y); cout << X << " " << Y << " " << Z << endl; }