#include <iostream>
#include <iomanip>
using namespace std;

int main(){
	double a[6];
	double x,y;
	cout<< setprecision(4) << setiosflags(ios::showpoint);
	while(true){
			if(cin.eof() == 1)
			break;
		cin >> a[0];
		cin >> a[1];
		cin >> a[2];
		cin >> a[3];
		cin >> a[4];
		cin >> a[5];

			
		x = (a[4]*a[2]-a[1]*a[5])/(a[0]*a[4]-a[1]*a[3]);
		y = (-a[3]*a[2]+a[0]*a[5])/(a[0]*a[4]-a[1]*a[3]);
		if(x == 0)
			x = 0;
		if(y == 0)
			 y = 0;
			 
		cout << x << " " << y << endl;
	}
	return 0;
}