import std.stdio;
void main() {
	float a,b,c,d,e,f;
	while ("%f %f %f %f %f %f\n".readf(&a,&b,&c,&d,&e,&f)) {
		float y = (c*d-a*f)/(b*d-a*e);
		float x = (c-b*y)/a;
		"%.3f %.3f".writefln(x, y);
	}
}