#include<iostream>
#include<stdio.h>
#include<algorithm>
#include<math.h>
using namespace std;
int main()
{
	float x,y,goukei,g,g1,a,b,c,d,e,f,a1,b1,c1,d1,e1,f1;
	while(scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f)!=EOF)
	{
		g=a*d;
			a1=d*a;
			b1=d*b;
			c1=d*c;
			e1=a*e;
			d1=a*d;
			f1=a*f;
			y=b1-e1;
			goukei=c1-f1;
			y/=goukei;
			x=(c-b*y)/a;	
		printf("%.3f %.3f",x,y);
	}
	return 0;
}