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

int main(){
	int a[6];
	int x,y;
	cout<< setprecision(3) << setiosflags(ios::showpoint) << setiosflags(ios::fixed);
	while(true){
		for(int i=0;i<=5;i++)
			cin >> a[i];
			
		if(cin.eof())
			break;
			
		x = (a[4]*a[2]-a[1]*a[5])/(a[0]*a[4]-a[1]*a[3]);
		y = (-a[3]*a[2]+a[0]*a[5])/(a[0]*a[4]-a[1]*a[3]);
			 
		cout << (double)x << " " << (double)y << endl;
	}
	return 0;
}