#include using namespace std; using ll=long long; int main() { double a,b,c,d,e,f; cin >> a >>b >> c >> d >> e >>f; double det = (a*e-b*d); cout << setprecision(10) << (e*c-b*f)/det << " " << (-d*c+a*f)/det << endl; return 0; }