#include <iostream>
#include <stdio.h>

using namespace std;

int main(int argc, char **argv)
{
	double a, b, c, d, e, f, tmp;
	
	while((cin >> a >> b >> c >> d >> e >> f)){
		tmp = (a*e-b*d);
		printf("%f %f\n", ((e*c-b*f)/tmp), ((a*f-d*c)/tmp));
	}
	
	return 0;
}