#include <iostream>
using namespace std;

int main()
{
	double a[6], x, y;

	while(cin>>a[0]){
		for(int i = 1; i < 6; i++){
			cin>>a[i];
		}
		y = (a[2]*a[3]-a[0]*a[5])/(a[1]*a[3]-a[0]*a[4]);
		x = (a[2]-a[1]*y)/a[0];

		x = ((double)((int)(x*1000+0.5)))/1000;
		y = ((double)((int)(y*1000+0.5)))/1000;

		printf("%.03f %.03f", x, y);
	}
}