#include<iostream>
using namespace std;

int main(){
	double a,b,c,d,e,f,det;
	double x,y;
	//cout << "Input the number: ";
	cin >> a;
	cin >> b;
	cin >> c;
	cin >> d;
	cin >> e;
	cin >> f;
	det = a*e-b*d;
//	if(det == 0) cout << "No answer" << endl;
	x = (1.0/det)*(e*c-b*f);
	y = (1.0/det)*(a*f-d*c);
//	cout << "x:" << x << " y:" << y << endl;
	cout << x << " " << y << endl;
	return 0;
}