#include <iostream>
#include <iomanip>
using namespace std;
int main() {
double a, b, c, d, det;
while ( cin >> a >> b >> c >> d && a != 0 && b != 0 && c != 0 && d != 0 ) {
det = a * d - b * c;
if ( det == 0 )
cout << "cheat!" << endl;
else {
cout << fixed << setprecision ( 5 ) << ( d / det ) << " " << ( -b / det ) << endl;
cout << fixed << setprecision ( 5 ) << ( -c / det ) << " " << ( a / det ) << endl;
}
}
}