import std.stdio;
import std.conv;
import std.algorithm;
import std.string;
import std.file;
  
void main() 
{
	string l;
	while((l = readln()).length >= 2)
	{
		float a, b, c, d, e, f;
		a = to!float(l.split()[0]), b = to!float(l.split()[1]), c = to!float(l.split()[2]);
		d = to!float(l.split()[3]), e = to!float(l.split()[4]), f = to!float(l.split()[5]);
		float x, y;
		y = (c * d - a * f)/(b * d - a * e)+0;
		x = (b * f - c * e)/(b * d - a * e)+0;
		writefln("%.3f %.3f" , x,y);
	}
}