#include<iostream>
#include<stdio.h>

int main(){
	int n;
	double a,b,c,d,e,f,x,y;

	scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f);

	x=(c*e-b*f)/(a*e-b*d);
	y=(c*d-a*f)/(b*d-a*e);

	printf("%.3lf% .3lf",x,y);

	return 0;
}