#include <sstream>
#include <iostream>
#include <iomanip>
#include <stdio.h>
#include <math.h>
#include <vector>
#include <string>
using namespace std;

int main(void) {
	double a=0,b=0,c=0,d=0,e=0,f=0;
	string rx,ry;
	vector<string> r;
	while (scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f) != EOF){
		double x=0,y=0;
		x = round((b*f-e*c)/(b*d-a*e)*1000+0.0001)/1000.0;
		y = round((a*f-d*c)/(a*e-b*d)*1000+0.0001)/1000.0;
		ostringstream os;
		os.setf(ios::showpoint);
		os << setprecision(4) << x << " " << y;
		r.push_back(os.str());
	}
	for (int i=0;i<r.size();i++)
	{
		cout << r[i] << endl;
	}
	return 0;
}