// #pragma GCC target("avx2") // #pragma GCC optimize("O3") // #pragma GCC optimize("unroll-loops") #include using namespace std; using fltype = long double; using itype = long long; vector quadratic_equation(itype a, itype b, itype c) { assert(abs(a) <= (1 << 30) && abs(b) <= (1 << 30) && abs(c) <= (1 << 30)); if (a) { if (a < 0) { a = -a; b = -b; c = -c; } itype d = b * b - 4 * a * c; if (d > 0) { if (b > 0) { fltype x1 = (-b - sqrt((fltype)d)) / (2 * a); fltype x2 = c / (fltype)a / x1; assert(x1 <= x2); return { x1, x2 }; } else { fltype x2 = (-b + sqrt((fltype)d)) / (2 * a); fltype x1 = c / (fltype)a / x2; assert(x1 <= x2); return { x1, x2 }; } } else if (d == 0) { return { -b / (fltype)(2 * a) }; } else { return {}; } } else if (b) { return { -c / (fltype)b }; } else if (c) { return {}; } else { // represents infinite return {-1, -1, -1}; } } int main() { cin.tie(0); ios::sync_with_stdio(0); itype a, b, c; cin >> a >> b >> c; vector res = quadratic_equation(a, b, c); cout << setprecision(16); if (res.size() == 3) { cout << -1 << '\n'; } else { cout << res.size() << '\n'; for (auto& i : res) { cout << i << '\n'; } } return 0; }