#include
#include
using namespace std;
int main() {
int a ,b ,c;
cin >> a >> b >>c;
if (a < -100 || a > 100 || b < -100 || b > 100 || c < -100 || c > 100) {
cout << "Invalid input" << endl;
return 0;
}
if (a==0 && b==0 && c==0) {
cout << "Invalid input" << endl;
return 0;
}
int d = b * b - 4 * a * c;
if(d>0){
int x1 = static_cast<int>(floor(-b + sqrt(d)) / (2*a));
int x2 = static_cast<int>(floor(-b - sqrt(d)) / (2*a));
cout << "Real and distinct." << endl;
if(x1<x2){
cout << x1 <<" ";
cout << x2;
}
else{
cout << x2 <<" ";
cout << x1 << endl;
}
}
else if(d==0){
int x = static_cast<int>(floor(-b / (2 * a)));
cout << "Real and Equal" << endl;
cout << x << " " << x;
}
else{
cout<<"Imaginary";
}
return 0;
}