The Department of economic development of IT City created a model of city development till year 2100.

To prepare report about growth perspectives it is required to get growth estimates from the model.

To get the growth estimates it is required to solve a quadratic equation. Since the Department of economic development of IT City creates realistic models only, that quadratic equation has a solution, moreover there are exactly two different real roots.

The greater of these roots corresponds to the optimistic scenario, the smaller one corresponds to the pessimistic one. Help to get these estimates, first the optimistic, then the pessimistic one.


-----Input-----

The only line of the input contains three integers a, b, c ( - 1000 ≤ a, b, c ≤ 1000) — the coefficients of ax^2 + bx + c = 0 equation.


-----Output-----

In the first line output the greater of the equation roots, in the second line output the smaller one. Absolute or relative error should not be greater than 10^{ - 6}.


-----Examples-----
Input
1 30 200

Output
-10.000000000000000
-20.000000000000000

Difficulty: interview

Starter code:

Solutions:
import math
a,b,c=map(int,input().split())
D = b ** 2 - 4 * a * c
x1 = (-b + math.sqrt(D)) / (2 * a)
x2 = (-b - math.sqrt(D)) / (2 * a)
ans1=max(x1,x2)
ans=min(x1,x2)
print(ans1)
print(ans)

import math

a, b, c = list(map(int, input().split()))
# a, b, c = 1, 30, 200
D = math.sqrt(b * b - 4 * a * c)
x1 = (-b + D) / (2 * a)
x2 = (-b - D) / (2 * a)
if D == 0:
    print(max(x1, x2))
else:
    print(max(x1, x2))
    print(min(x1, x2))


a, b, c = map(int, input().split())

d = (b * b - 4 * a * c)**0.5
x1, x2 = (-b - d) / (2 * a), (-b + d) / (2 * a)

print(max(x1, x2))
print(min(x1, x2))

import math

def main():
    a, b, c = input().split(' ')
    a, b, c = int(a), int(b), int(c)
    D = math.sqrt(b*b-4*a*c)
    x1, x2 = (-b+D)/(2*a), (-b-D)/(2*a)
    if x1 < x2:
        x1, x2 = x2, x1
    print(x1)
    print(x2)

def __starting_point():
    main()
__starting_point()

a,b,c=list(map(int,input().split()))
d=(b*b-4*a*c)**0.5
print(max((-b+d)/(2*a),(-b-d)/(2*a)))
print(min((-b+d)/(2*a),(-b-d)/(2*a)))


a, b, c = list(map(int, input().split()))
d = b ** 2 - 4 * a * c
x1 = (-b + d ** 0.5) / (2 * a)
x2 = (-b - d ** 0.5) / (2 * a)
x1, x2 = min(x1, x2), max(x1, x2)
print(x2)
print(x1)


from math import factorial as f

a, b, c = map(int, input().split())

d = (b*b-4*a*c)**.5
t = [(-b-d)/2/a, (-b+d)/2/a]
for i in reversed(sorted(t)): print(i)

from decimal import *
from math import sqrt

def __starting_point():

    getcontext().prec = 50
    a , b , c = map(Decimal,input().split())

    d = Decimal(sqrt( b*b - 4*a*c ))
    res1 = (d-b)/(2*a)
    res2 = (-d-b)/(2*a)
    print( max(res1,res2) )
    print( min(res1,res2) )
__starting_point()

a, b, c = map(int, input().split())
data = sorted([(-b + (b ** 2 - 4 * a * c) ** 0.5) / (2 * a), (-b - (b ** 2 - 4 * a * c) ** 0.5) / (2 * a)])
print(data[1])
print(data[0])

a, b, c = list(map(int, input().split()))
D = (b * b - 4 * a * c) ** 0.5
ans1 = (-b + D) / (2 * a)
ans2 = (-b - D) / (2 * a)
if ans1 < ans2: ans1, ans2 = ans2, ans1
print(ans1)
print(ans2)


from math import *
a, b, c = map(int, input().split())
d = b ** 2 - 4 * a * c
x1 = (- b + sqrt(d)) / (2 * a)
x2 = (- b - sqrt(d)) / (2 * a)
print(max(x1, x2))
print(min(x1, x2))

import sys


def fact(k):
    return k ** 2 * (k - 1) ** 2 * (k - 2) ** 2 * (k - 3) ** 2 * (k - 4) ** 2


a, b, c = [int(x) for x in input().split()]

d = b * b - 4 * a * c

x1 = (-b - d ** 0.5) / 2 / a
x2 = (-b + d ** 0.5) / 2 / a

print(max([x1, x2]))
print(min([x1, x2]))


a, b, c = list(map(int, input().split()))
D = b * b - 4 * a * c
x = (-b + D ** 0.5) / 2 / a
y = (-b - D ** 0.5) / 2 / a
print(max(x, y))
print(min(x, y))


import re, sys, string, operator, functools, fractions, collections
sys.setrecursionlimit(10**7)
dX= [-1, 1, 0, 0,-1, 1,-1, 1]
dY= [ 0, 0,-1, 1, 1,-1,-1, 1]
RI=lambda x=' ': list(map(int,input().split(x)))
RS=lambda x=' ': input().rstrip().split(x)
mod=int(1e9+7)
eps=1e-6
#################################################
a,b,c=RI()
d=pow(b*b-4*a*c, 0.5)
r1=(-b+d)/(2*a)
r2=(-b-d)/(2*a)
if r1<r2:
    r1,r2=r2,r1
print("%.20f\n%.20f" %(r1,r2))






from decimal import Decimal
a, b, c = list(map(Decimal, input().split()))

d = (b * b - Decimal('4') * a * c).sqrt()

if a >= 0:
    print((-b + d) / (Decimal('2') * a))
    print((-b - d) / (Decimal('2') * a))
else:
    print((-b - d) / (Decimal('2') * a))
    print((-b + d) / (Decimal('2') * a))


from functools import reduce
from math import factorial
a, b, c = [int(x) for x in input().split()]
sq = (b**2 - 4*a*c) ** 0.5
x, y = (-b + sq) / (2*a), (-b - sq) / (2*a)
if a < 0: x, y = y, x
print(x)
print(y)


from math import *

a, b, c = [int(t) for t in input().split()]
d = b*b - 4*a*c

l = (-b+sqrt(d))/(2*a)
r = (-b-sqrt(d))/(2*a)

print(max(l, r), min(l, r), sep='\n')

a, b, c = map(int, input().split())
d = b ** 2 - 4 * a * c
x1 = (-b + d ** 0.5) / (2 * a)
x2 = (-b - d ** 0.5) / (2 * a)
print(max(x1, x2))
print(min(x1, x2))

a, b, c = map(int, input().split(' '))
d = -b+(b**2-4*a*c)**0.5
e = -b-(b**2-4*a*c)**0.5
d/=(2*a)
e/=(2*a)
if d>e:
    print(d)
    print(e)
else:
    print(e)
    print(d)

a,b,c = list(map(int, input().split()))
di = (b**2 - 4*a*c)**(1/2)
if a > 0:
 print((-b + di)/(2*a))
 print((-b - di)/(2*a))
else:
 print((-b - di)/(2*a))
 print((-b + di)/(2*a))


a,b,c=[int(x) for x in input().split()]

z = (b**2-4*a*c)**0.5

r1=(-b-z)/(2*a)
r2=(-b+z)/(2*a)

if r1>r2:
    print(r1)
    print(r2)
else:
    print(r2)
    print(r1)


a, b, c = map(int, input().split())
D = b ** 2 - 4 * a * c
x1 = (-b + D ** 0.5) / (2 * a)
x2 = (-b - D ** 0.5) / (2 * a)
print(max(x1, x2))
print(min(x1, x2))

from math import *

a, b, c = map(float, input().split())
d = b * b - 4 * a * c
x1, x2 = (-b + sqrt(d)) / (2 * a), (-b - sqrt(d)) / (2 * a)
print(max(x1, x2))
print(min(x1, x2))