#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
	float a,b,c,d,e,f,x,y;
	while(cin>>a>>b>>c>>d>>e>>f){
		y=(a*f-d*c)/(e*a-d*b);
		x=(c-b*y)/a;
		printf("%.3f %.3f\n",x,y);
	}
}