#include<stdio.h>
#include<math.h>

int main(void){
	double x,y;
	int a=0,b=0,c=0,d=0,e=0,f=0,i=0,j;
    
    while(scanf("%d %d %d %d %d %d\n",&a,&b,&c,&d,&e,&f) != EOF)
	{
		x = (c * e -b * f) / (a * e - b * d);
	    y = ((c - a * x) / b);

		printf("%.3lf %.3lf\n",x,y);
	}
  return 0;
}