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

#define EPS (1e-10)

using namespace std;
//?
int main(void){
	double a,b,c,d,p,q;
	while(cin >> a >> b >> p >> c >> d >> q){
		double delta = a*d-b*c;
		double x,y;
		x = (d*p-b*q)/delta;
		y = (-c*p+a*q)/delta;
		printf("%.3f %.3f\n",x+EPS,y+EPS);
	}
	return 0;
}