#include<iostream>

using namespace std;

int main()
{
	int a[6];
	double detA;
	double ansx, ansy;
	
	for(int i = 0; i < 6; i++){
		cin >> a[i];
	}
	
	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",ansx,ansy);
}