#include <cstdio>
#define LOOP(index,times) for(int index=0;index<times;index++)
using namespace std;

int main(){

float l[6];

while(scanf("%f %f %f %f %f %f",&l[0],&l[1],&l[2],&l[3],&l[4],&l[5]) != EOF){

	printf("%.3lf %.3lf\n",(l[2]*l[4]-l[1]*l[5])/(l[0]*l[4]-l[1]*l[3]),(l[2]*l[3]-l[0]*l[5])/(l[1]*l[3]-l[0]*l[4]));		

}
return 0;		
}