#include<stdio.h>

int main(void){
	int i,j,k;	//sñ\¦
	double p,d,a[5][5]={0};			//p=s|bgAd=XC[vìÏ
	
	
	while(scanf("%lf %lf %lf %lf %lf %lf",&a[0][0],&a[0][1],&a[0][2],&a[1][0],&a[1][1],&a[1][2])!=EOF)
	{		
	
		//printf("%fx+%fy=%f\n",a[0][0],a[0][1],a[0][2]);		mF
		//printf("%fx+%fy=%f\n",a[1][0],a[1][1],a[1][2]);
	
	
		for(k=0;k<2;k++){
			/* s{bgXC[vìÅWðÎp»:s{bgW */
			p=a[k][k];	
			
			for(j=k;j<(2+1);j++){
				/* s{bgsÌeWðs{bgWÅé*/
				a[k][j]=a[k][j]/p;
			}
			
			for(i=0;i<2;i++){
				/*s{bgñÌXC[vì:s{bgsÅÈ¢êÌÝÀs */
				if (i!=k) {   
					d=a[i][k];
					
					for (j=k;j<2+1;j++){
						a[i][j]= a[i][j]-d*a[k][j];
					}
				
				}
			}
		}	
	
		
		for (k = 0; k < 2; k++){
			printf("%.3f ",a[k][2]);
		}
		
		printf("\n");
	}	
	
	return 0;
}