#include <iostream>
#include <queue>
#include <stack>
#include <vector>
#include <stdio.h>
#include <algorithm>
#include <string.h>
#include <string>
#include <cmath>
#include <complex>
#include <map>
using namespace std;

#define rep(i,n) for(int i=0;i<int(n);++i)
#define ALL(v) (v).begin(),(v).end()
#define PB push_back
#define EPS 1e-8
#define F first
#define S second

static const double PI=6*asin(0.5);
typedef long long ll;
typedef complex<double> CP;
typedef pair<int,int> P;
static const int INF=1<<24;

int main(){
	double a,b,c,d,e,f;
	while(cin>>a>>b>>c>>d>>e>>f){
		double x,y;
		if(a==0){
			y=c/b;
			x=(f-e*y)/d;
		}
		else if(b==0){
			x=c/a;
			y=(f-d*x)/e;
		}
		else if(d==0){
			y=f/e;
			x=(c-b*y)/a;
		}
		else if(e==0){
			x=f/d;
			y=(c-a*x)/b;
		}
		else{
			double td=d,te=e,tf=f;
			//(f-e*y)/d=(c-b*y)/a
			y=(f/d-c/a)/(e/d-b/a);
			x=(c-b*y)/a;
		}
		printf("%.3f %.3f\n",x,y);
	}
	return 0;
}