#include <stdio.h>

int main(void)
{
	int ren[3];
	int ren2[3];
	float x;
	float y;
	float z;
	
	while (scanf("%d %d %d %d %d %d",&ren[0],&ren[1],&ren[2],&ren2[0],&ren2[1],&ren2[2]) != EOF){
		x = (double)(ren[2]*ren2[1] - ren2[2]*ren[1]) / (ren[0]*ren2[1] - ren2[0]*ren[1]);
		y = (double)(ren[2]*ren2[0] - ren2[2]*ren[0]) / (ren[1]*ren2[0] - ren2[1]*ren[0]);
		
		printf("%.3f %.3f\n",x,y);
	}
	return(0);
}