#define _CRT_SECURE_NO_WARNINGS
#include <cstdio>
#include <iostream>
#include <vector>
#include <list>
#include <map>
#include<string>
#include <algorithm>
#include <functional>
#include <cmath>
using namespace std;
typedef vector <int> ivector;


int main(){
	float a, b, c, d, e, f;
	while (scanf("%f%f%f%f%f%f",&a,&b,&c,&d,&e,&f)!=EOF)
	{

		
		float x = (c*e - b*f) / (a*e - b*d);
		float y = (c*d - a*f) / (b*d - a*e);
		printf("%.3f %.3f\n", x, y);
	}
	

	return 0;
}