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

using namespace std;
int main(void){
	double a,b,c,d,e,f,x,y;
	cin >> a >> b >> c >> d >> e >> f;
	y = (f-d*c/a)/(e-d*b/a);
	x = c/a-b/a*y;
	printf("%.4f",x);
	printf(" ");
	printf("%.4f\n",y);	
}