#include<stdio.h>

int a ;
int b ;
int c ;
int d ;
int e ;
int f ;
double x ;
double y ;

int main()
{
	while ( scanf ( "%d %d %d %d %d %d" , &a , &b , &c , &d , &e , & ) == 6 ) {
		y = (c*a-f*a)/(b*a-e*a) ;
		x = ( c - b*(c*a-f*a)/(b*a-e*a) ) / a ;
		printf ( "%.3llf %.3llf\n" , x , y ) ;
	}
	return 0 ;
}