#include<iostream>
#include <stdio.h>

using namespace std;

int main(){
	double a,b,c,d,e,f;
	double x,y;
while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)!=EOF)
{

		x=(e*c-f*b)/(e*a-b*d);
		y=(d*c-f*a)/(b*d-a*e);

		printf("%.3f %.3f\n",x,y);
		
	}
}