#include<iostream>
#include<vector>
#include<map>
#include<string>
using namespace std;

int main() {
	int a, b, c, d, e, f;
	std::vector<int> x_vector;
	std::vector<int> y_vector;
	//int cnt = 0;
	
	while (cin >> a >> b >> c >> d >> e >> f) {

	//???????????°
		/*
	while (!cnt) {
		cnt++;
		cin >> a >> b >> c >> d >> e >> f;
		*/
	//end ???????????°

		int x = (b * f - c * e) / (b * d - a * e);	//?????¶???????????£??????
		int y = (c * d - a * f) / (b * d - a * e);		//?????¶???????????£??????

		x_vector.push_back(x);
		y_vector.push_back(y);
	}

	for (int i = 0; i < x_vector.size(); i++) {
		cout << x_vector[i] << " " <<  y_vector[i] << endl;
	}

	while (1);

	return 0;
}