#include<iostream>
#include<cstdio>
using namespace std;
int main(){
long a,b,c,d,e,f;
double g;
for(;;){
cin>>a>>b>>c>>d>>e>>f;
if(cin.eof())break;
g=a*e-b*d;
printf("%.3f %.3f\n",(c*e-b*f)/g,(a*f-c*d)/g);
}
return 0;
}