#include <iostream>
#include <cstdio>

int main(){
	
	double x,y,a,b,c,d,e,f;
	while(std::cin >> a >> b >> c >> d >> e >> f){
	y = (d*c - a*f)/(d*b - a*e);
	x = (c - b*y)/a;
	std::printf("%-.3f %-.3f", x, y);
	}
	
	return 0;
}