#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>

#define N 1024

int main()
{
	char buff[N];
	
	while (NULL != fgets(buff, N, stdin))
	{
		double a, b, c, d, e, f;
		sscanf(buff, "%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f);
		
		double dd = a * e - b * d;
		double x = ( e * c - b * f ) / dd + 0.0;
		double y = ( - d * c + a * f ) / dd + 0.0;
		
		printf("%.3f %.3f\n", x, y);
	}
	return 0;
}