#include <iostream>
#include <iomanip>
using namespace std;

class data {
public:
	int number[6];
	double substitute_x(int num){
		return (number[2] - number[1] * num) / number[0];
	}
	double quadratic_y() {
		return
			(number[2] * number[3] - number[0] * number[5])
			/ (number[1] * number[3] - number[0] * number[4]);
	}
};

int main() {
	data temp;
	while (cin >> temp.number[0]) {
		for (int i = 1; i < 6; i++) {
			cin >> temp.number[i];
		}
		cout << fixed << setprecision(3) 
			<< temp.substitute_x(temp.quadratic_y()) << flush;
		cout << " " << flush;
		cout << fixed << setprecision(3) 
			<< temp.quadratic_y() << endl;
	}
	return 0;
}
