#include #include #include void logging(int n, double x1, double x2) { printf("%d\n", n); if (n == 1) { printf("%.15lf\n", x1); } else if (n == 2) { printf("%.15lf\n%.15lf\n", x1, x2); } exit(EXIT_SUCCESS); } int main(void) { long a, b, c; double s1, s2; long long D; scanf("%ld%ld%ld", &a, &b, &c); if (a == 0) { if (b == 0) { if (c == 0) { logging(-1, 0, 0); } logging(0, 0, 0); } s1 = (double)-c/b; logging(1, s1, 0); } if (a == b && b == c) { logging(0, 0, 0); } if (b == 0) { if (c == 0) { logging(1, 0, 0); } s1 = sqrt(-(double)c/a); s2 = -s1; logging(2, s1, s2); } if (c == 0) { s1 = 0; s2 = -(double)b/a; if (s1 < s2) { logging(2, s1, s2); } logging(2, s2, s1); } if (b%2 == 0) { D = (long long)(b/2)*(b/2) - (long long)a*c; if (D > 0) { s1 = -(double)(b/2)/a - sqrt(D)/a; s2 = -(double)(b/2)/a + sqrt(D)/a; logging(2, s1, s2); } else if (D == 0) { s1 = (double)-b/a; logging(1, s1, 0); } else { logging(0, 0, 0); } } D = (long long)b*b - (long long)4*a*c; if (D > 0) { s1 = (double)-b/(2*a) - sqrt(D)/(2*a); s2 = (double)-b/(2*a) + sqrt(D)/(2*a); logging(2, s1, s2); } else if (D == 0) { s1 = (double)-b/(2*a); logging(1, s1, 0); } else { logging(0, 0, 0); } return EXIT_SUCCESS; }