#include<iostream>
#include<stdio.h>
using namespace std;

int main()
{
	float a[6],b[6]={0,0,0,0,0,0},c=0;

	while(1){
		for(int i=0;i<6;i++)
			cin>>a[i];

		printf("%.4f %.4f",(a[4]*a[2]-a[1]*a[5])/(a[0]*a[4]-a[1]*a[3]),(a[0]*a[5]-a[2]*a[3])/(a[0]*a[4]-a[1]*a[3]));
		for(int i=0;i<6;i++){
			if(a[i]==b[i]){
				c++;
				if(c==6)
					return 0;
			}
			for(int j=0;j<6;j++)
				a[i]=b[i];
		}
	}
}