In what concerns the continuous evaluation solving exercises grade during the semester, you should submit until 23:59 of October 26th
(this exercise will still be available for submission after that deadline, but without couting towards your grade)
[to understand the context of this problem, you should read the class #03 exercise sheet]


[IP020] I am root

Quadratic equations play a fundamental role in algebra and mathematics. In this exercise, you will write a program that calculates the roots of a quadratic equation given its coefficients.

The Problem

Write a program that calculates the roots of a quadratic equation of the form: \[ ax^2 + bx + c = 0 \] Remember that the roots can be real or complex. Use math.sqrt in your calculations.

Input

The input consists of three floating-point numbers:

Output

The output should display the roots of the equation in the following formats:

All the printed numbers should be rounded to two decimal places.

Constraints

The following limits are guaranteed in all the test cases that will be given to your program:

a ≠ 0       The coefficient a will not be zero
-100 <= a, b, c <= 100       Range for coefficients

Example Input 1 Example Output 1
1
-5
6
R1 = 3.0
R2 = 2.0

Example Input 2 Example Output 2
1
4
5
R1 = -2.0 + 1.0i
R2 = -2.0 - 1.0i

Example Input 3 Example Output 3
1
-4
4
R = 2.0

Introduction to Programming (CC1024)
DCC/FCUP - University of Porto