#include <iostream>
#include <complex>
int main()
{
std::complex<double> a = 3.0;
std::complex<double> b = 2.0;
std::complex<double> c = 1.0;
std::complex<double> d = sqrt(pow(b,2)- 4.0*a*c);
std::complex<double> r1 = (-b + d)/(2.0*a);
std::complex<double> r2 = (-b - d)/(2.0*a);
std::cout << "The answers are " << std::showpos << '\n'
<< r1.real() << " " << r1.imag() << "i\n"
<< r2.real() << " " << r2.imag() << "i\n";
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y29tcGxleD4KCmludCBtYWluKCkKewogICAgc3RkOjpjb21wbGV4PGRvdWJsZT4gYSA9IDMuMDsKICAgIHN0ZDo6Y29tcGxleDxkb3VibGU+IGIgPSAyLjA7CiAgICBzdGQ6OmNvbXBsZXg8ZG91YmxlPiBjID0gMS4wOwoKICAgIHN0ZDo6Y29tcGxleDxkb3VibGU+IGQgPSBzcXJ0KHBvdyhiLDIpLSA0LjAqYSpjKTsKICAgIHN0ZDo6Y29tcGxleDxkb3VibGU+IHIxID0gKC1iICsgZCkvKDIuMCphKTsKICAgIHN0ZDo6Y29tcGxleDxkb3VibGU+IHIyID0gKC1iIC0gZCkvKDIuMCphKTsKICAgIHN0ZDo6Y291dCA8PCAiVGhlIGFuc3dlcnMgYXJlICIgPDwgc3RkOjpzaG93cG9zIDw8ICdcbicKICAgICAgICAgICAgICA8PCByMS5yZWFsKCkgPDwgIiAiIDw8ICByMS5pbWFnKCkgPDwgImlcbiIKICAgICAgICAgICAgICA8PCByMi5yZWFsKCkgPDwgIiAiIDw8IHIyLmltYWcoKSA8PCAiaVxuIjsKfQo=