#include using namespace std; int64_t a, b, c, det; double f(double x) { double plus = 0.0, minus = 0.0, ax2 = a * x * x, bx = b * x; if (ax2 >= 0) { plus += ax2; } else { minus += ax2; } if (bx >= 0) { plus += bx; } else { minus += bx; } if (c >= 0) { plus += c; } else { minus += c; } return plus + minus; } int main() { cin >> a >> b >> c; assert(-1000000000 <= a && a <= 1000000000); assert(-1000000000 <= b && b <= 1000000000); assert(-1000000000 <= c && c <= 1000000000); det = b * b - 4 * a * c; cout << setprecision(17); if (a == 0) { if (b == 0) { if (c == 0) { cout << -1 << endl; } else { cout << 0 << endl; } } else { cout << 1 << endl; cout << (double) -c / b << endl; } } else { if (det < 0) { cout << 0 << endl; } else if (det == 0) { cout << 1 << endl; cout << (double) -b / (2 * a) << endl; } else { cout << 2 << endl; double lower_bound = -10000000000, upper_bound = (double) -b / (2 * a); while (lower_bound < upper_bound) { double half = (lower_bound + upper_bound) / 2; if (f(lower_bound) == 0) break; if (f(lower_bound) * f(half) < 0) { if (upper_bound == half) break; upper_bound = half; } else { if (lower_bound == half) break; lower_bound = half; } } cout << lower_bound << endl; lower_bound = (double) -b / (2 * a); upper_bound = 10000000000; while (lower_bound < upper_bound) { double half = (lower_bound + upper_bound) / 2; if (f(lower_bound) == 0) break; if (f(lower_bound) * f(half) < 0) { if (upper_bound == half) break; upper_bound = half; } else { if (lower_bound == half) break; lower_bound = half; } } cout << lower_bound << endl; } } }