#include<iostream>
#include<iomanip>
using namespace std;
#include<algorithm>
#include<math.h>
#include<string>
void f(double a1, double a2, double b1, double b2,double c1, double c2) {
double A = a1 - a2;
double B = b1 - b2;
double C = c1 - c2;
double delt = B * B - 4 * A*C;
if (delt >= 0) {
double x1, x2;
x1 = (-B - sqrt(delt)) / (2 * A);
x2 = (-B + sqrt(delt)) / (2 * A);
if (x1 <= x2) {
cout << fixed << setprecision(2) << x1 << " " << x2 << endl;
}
else {
cout << fixed << setprecision(2) << x2 << " " << x1 << endl;
}
}
else {
cout << "No Solution" << endl;
}
}
void f2(double &a1, double &b1,double &c1, string s1) {
//二次项
if (s1.find("x^2", 0) != s1.npos) {
int i = s1.find("x^2", 0)-1;
for (; i >= 0; i--) {
if ((s1[i]<'0' || s1[i]>'9') && s1[i] != '-')break;
}
if (i == s1.find("x^2", 0) - 1) {//系数为1
a1 = 1;
s1.erase(i + 1, s1.find("x^2", 0) + 2 - i);
}
else {
string str1 = s1.substr(i + 1, s1.find("x^2", 0) - i-1);
s1.erase(i + 1, s1.find("x^2", 0) + 2 - i);
a1 = stoi(str1);
}
}
//一次
if (s1.find("x", 0) != s1.npos) {
int i = s1.find("x", 0) - 1;
for (; i >= 0; i--) {
if ((s1[i]<'0' || s1[i]>'9')&&s1[i]!='-')break;
}
if (i == s1.find("x", 0) - 1) {
b1 = 1;
s1.erase(i + 1, s1.find("x", 0) - i);
}
else {
string str2 = s1.substr(i + 1, s1.find("x", 0) -i- 1);
s1.erase(i + 1, s1.find("x", 0) - i);
b1 = stoi(str2);
}
}
//常数
while (s1.find('+', 0) != s1.npos) {
s1.erase(s1.find('+', 0), 1);
}
if (s1.size() != 0) {
//cout << "s1="<<s1 << endl;
c1 = stoi(s1);
}
}
int main() {
ios::sync_with_stdio(false);
string s;
while (cin >> s) {
string s1, s2;
s1 = s.substr(0, s.find('=', 0));
s2 = s.substr(s.find('=', 0) + 1, s.size() - s.find('=', 0) - 1);
//cout << s1 << endl << s2 << endl;
double a1 = 0, a2 = 0, b1 = 0, b2 = 0, c1 = 0, c2 = 0;
f2(a1, b1, c1, s1);
//cout << a1 << "," << b1 << "," << c1 << endl;
f2(a2, b2, c2, s2);
f(a1, a2, b1, b2, c1, c2);
}
return 0;
}