#include <iostream>
#include <cstdio>
int main(){
float a,b,c,d,e,f,x,y;
while(std::cin>>a>>b>>c>>d>>e>>f){
	x = (b*f-c*e)/(b*d-a*e);
	y = (f*a-d*c)/(a*e-b*d);
	printf("%.4f %.4f\n",x==-0.000?0.000:x, y==-0.000?0.000:y);
}
}