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

int main()
{
	double a, b, c, d, e, f;
	while( scanf( "%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f ) != EOF ){
		double det = b * d - a * e;
		printf( "%.3f %.3f\n", ( b * f - c * e ) / det, ( c * d - a * f ) / det );
	}

 	return 0;
}