#include<iostream>

using namespace std;

int main()
{
	while(1){
		int a[6];
		double detA;
		double ansx, ansy;
		
		for(int i = 0; i < 6; i++){
			cin >> a[i];
			if(a[i] == EOF){
				exit(0);
			}
		}
		
		detA = ((a[0]*a[4])-(a[1]*a[3]));
		
		ansx = ((a[2]*a[4])-(a[1]*a[5]))/detA;
		ansy = ((a[0]*a[5])-(a[2]*a[3]))/detA;
		
		if(ansx == 0){
			ansx = 0;
		}
		if(ansy == 0){
			ansy = 0;
		}
		
		printf("%.4lf %.4lf\n",ansx,ansy);
	}
}