#include <iostream>
#include <vector>
#include <cstdio>
#include <algorithm>
using namespace std;

int main(){
	int T;
	double a,b,c,d,e,f;
	while(cin >> a >> b >> c >> d >> e >> f){
		double D = a*e-b*d;
		double x = c*e-b*f;
		double y = a*f-c*d;
		x /= D;
		y /= D;
		x += 1e-9;
		y += 1e-9;
		printf("%.4lf %.4lf\n",x,y);
	}
}