#include <iostream>
#include <cstdio>
#include <vector> 
#include <iomanip>
#include <cmath>

int rintv(double v) 
{
	return (v > 0) ? ((int)(v + 0.5)) : ((int)(v - 0.5)); 
}

double round_off(int dec_p, double value)
{
	double shift = pow(10, -dec_p);
	int intv = rintv(shift * value);
	return intv / shift;
}

int main()
{
	std::vector<double> x, y;
	double a, b, c, d, p, q;
	while (scanf("%d %d %d %d %d %d", &a, &b, &p, &c, &d, &q) != EOF)
	{
		x.push_back((d*p - b*q) / (a*d - b*c));
		y.push_back((a*q - c*p) / (a*d - b*c));
	}

	for (int i = 0; i < x.size(); ++i)
		std::cout << round_off(-5, x[i]) << " " << round_off(-5, y[i]) << std::endl;
	return 0;
}