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

int main(void){
	double x1[1000],y1[1000];
	int a[1000],b[1000],c[1000],d[1000],e[1000],f[1000],i=0,j,r=0,x2[1000],y2[1000];
    
    while(r==0)
	{
		scanf("%d %d %d %d %d %d",&a[i],&b[i],&c[i],&d[i],&e[i],&f[i]);
	    x2[i] = (c[i] * e[i] -b[i] * d[i]) / (a[i] * e[i] - b[i] * d[i])*1000+0.5;
	    y2[i] = (d[i] * c[i] -a[i] * f[i]) / (b[i] * d[i] - a[i] * e[i])*1000+0.5;

		if(a[i] < -1000 || a[i] > 1000  || b[i] < -1000 || b[i] > 1000 ||
		   c[i] < -1000 || c[i] > 1000  || d[i] < -1000 || d[i] > 1000 || 
		   e[i] < -1000  || e[i] > 1000 || f[i] < -1000 || f[i] > 1000)break;
		
		i=i+1;
	}
	for(j=0;j<i;j++)
	{
		x1[j]=x2[j]/1000;
		y1[j]=y2[j]/1000;
		printf("%f %f\n",x1[j],y1[j]);
	}
  return 0;
}