#include<iostream>
#include <algorithm>
#include <functional>
using namespace std;

int main(){

	float a,b,c,d,e,f,x,y;

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