#include<cstdio>
#include<algorithm>
#include<vector>
#include<string>
#include<iostream>
#include<queue>
#include<map>
#include<set>

using namespace std;

#define reps(i,f,n) for(int i=f;i<int(n);i++)
#define rep(i,n) reps(i,0,n)

int main(){
	double a,b,c,d,e,f;
	while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)!=EOF){
		double A = b/a-e/d;
		double B = c/a-f/d;
		
		double y = B/A;
		double x = c/a-b/a*y;
		
		
		printf("%.9lf %.9lf\n",x,y);
	}
}