#include <iostream>
#include <iomanip>
using namespace std;
int main(){
double a,b,c,d,e,f;
while(cin >> a >> b >> c >> d >> e >> f,!cin.eof()){
b/=a,c/=a,a=1;
e-=d*b,f-=d*c,d=0;
f/=e,e=1;
c-=b*f,b=0;
c+=0.0004,f+=0.0004;
cout << setprecision(3) << fixed << c << " " << f << endl;
}
}