#include <stdio.h>
#include <iostream>
using namespace std;

int main() {
	//ax + by = c
	//dx + ey = f

	int A, B, C, D, E ,F = 0;
	cin >> A >> B >> C >> D >> E >> F;

	int COMMON_A = D;
	int COMMON_B = A;
	
	A *= COMMON_A;
	B *= COMMON_A;
	C *= COMMON_A;
	D *= COMMON_B;
	E *= COMMON_B;
	F *= COMMON_B;

	int X,Y;
	Y = (E-B);
	if((F-C) == 0 && (E-B) < 0)
		Y = -Y;
	float y = (F-C) / (E-B);

	X = (C-B*y);

	float x;
	x = (C- B * y) / A;
	if (X == 0 && A < 0)
		x = -x;

	printf("%0.3f %0.3f\n",x,y);

	return 0;
}