#include<iostream>
#include"stdio.h"
using namespace std;

int main(){
	double a,b,c,d,e,f;
	double x,y;
	
	cin >> a >> b >> c >> d >> e >> f ;
	
	y = (f - d*c/a )/(e - b*d/a );
	x = (c - b*y)/a;
	
//	cout << x << endl << y << endl;
	printf("%.3f\n",x);
	printf("%.3f\n",y);
	
}