Go: package main

import "fmt"

func main() {
	var resultX, resultY [100]float32
	var count int
	for {
		var a, b, c, d, e, f, x, y float32
		fmt.Scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f)
		if a == 0 {
			break
		}
		//Simultaneous equation
		y = (((a * f) - (d * c)) / ((a * e) - (b * d)))
		x = ((c - (b * y)) / a)
		resultX[count] = x
		resultY[count] = y
		count++
	}
	for i := 0; i < count; i++ {
		fmt.Printf("%.3f %.3f\n", resultX[i], resultY[i])
	}
}

C++: #include <iostream>
#include <cstdio>
#include <iomanip>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <bitset>
#include <stack>
#include <utility>
#include <numeric>
#include <algorithm>
#include <functional>
#include <cctype>
#include <complex>
#include <string>
#include <sstream>
#include <fstream>
#include <cassert>
using namespace std;


//common

#define BR "\n"
#define ALL(c) (c).begin(),(c).end()
#define REP(i,n) for(int i=0;i<(int)(n);++i)
#define FOR(i,l,r) for(int i=(int)l;i<(int)(r);++i)
#define EACH(it,o) for(auto it = (o).begin(); it != (o).end(); ++it)
#define IN(l,v,r) ((l)<=(v) && (v)<(r))

//config
//#define NDEBUG

//debug
#ifdef NDEBUG
#define DUMP(x)
#define DUMPLN(x)
#define DEBUG(x)
#define DEBUGLN(x)
#define LINE()
#define LINELN()
#define CHECK(exp,act)
#define STOP(e)
#else
#define DUMP(x)  cerr << #x << " = " << (x)
#define DUMPLN(x)  DUMP(x) <<endl
#define DEBUG(x) DUMP(x) << LINE() << " " << __FILE__
#define DEBUGLN(x) DEBUG(x)<<endl
#define LINE()    cerr<< " (L" << __LINE__ << ")"
#define LINELN()    LINE()<<endl
#define CHECK(exp,act)  if(exp!=act){DUMPLN(exp);DEBUGLN(act);}
#define STOP(e)  CHECK(e,true);if(!(e)) exit(1);
#endif

stringstream ss;
template<class T> inline string toString(const vector<T>& x) {
	ss.str("");
	REP(i,x.size()){
		if(i!=0)ss<<" ";
		ss<< x[i];
	}
	return ss.str();
}
template<class T> inline string toString(const vector<vector<T> >& map) {
	ss.str("");
	REP(i,map.size()){
		if(i!=0)ss<<BR;
		ss<< toString(map[i]);
	}
	return ss.str();
}
template<class K,class V>  string toString(map<K,V>& x) {
	ss.str("");
	for(auto& p:x)ss<< p.first<<":" << p.second<<" ";
	return ss.str();
}

string BITtoString(int bit){
    ss.str("");
	while(bit!=0){ss<<(bit%2);bit/=2;}
    string res=ss.str();reverse(ALL(res));
    return res;
}

char tmp[1000];
#define nextInt(n) scanf("%d",&n)
#define nextLong(n) scanf("%lld",&n)
#define nextDouble(n) scanf("%lf",&n)  //I64d
#define nextChar(n) scanf("%c",&n)
#define nextString(n) scanf("%s",tmp);n=tmp

//(int) verified by http://jag2013summer-day4.contest.atcoder.jp/submissions/106203
//(double) verified by SRM318

namespace _double_tmpl{
	typedef double D;
	const D EPS = 1e-8,INF = 1e12;
	
	static constexpr D Ae=0;
	D A(D a,D b){return a+b;}D Ainv(D a){return -a;}
	D S(D a,D b){return A(a,Ainv(b));}
	
	static constexpr D Me=1;
	D M(D a,D b){return a*b;}D Minv(D a){return 1.0/a;};

    D sig(D a,D b=0){return a<b-EPS?-1:a>b+EPS?1:0;}
    bool eq(D a,D b){ return sig(a-b)==0;}
    D norm(D a){ return a*a;}
}

typedef long long ll;

//(int) verified by http://jag2013summer-day4.contest.atcoder.jp/submissions/106203
//(double) verified by SRM318
//m項間漸化式…O(m^3*log(n))

namespace Matrix{
	#define H(mat) mat.size()
	#define W(mat) mat[0].size()
	
	class Inconsistent{//none
	};
	class Ambiguous{//many
	};

	class NoSolution{
	};

	using namespace _double_tmpl;
	template <typename T> class Mat :public vector<vector<T>> {
		public:

		// tropical
		// static const T Ae=INF;
		// T A(T a,T b){return min(a,b);}
		// static const T Me=0;
		// T M(T a,T b){return a+b;}
		
		// double
		// static constexpr T Ae=0.0;
		// T A(T a,T b){return a+b;}T Ainv(T a){return -a;}
		// static constexpr T Me=1.0;
		// T M(T a,T b){return a*b;}T Minv(T a){return 1/a;}

		Mat(int H,int W) : vector<vector<T>>(H){
			REP(y,H)this->at(y)=vector<T>(W);
		}
		Mat(int H,int W,int v) : vector<vector<T>>(H){
			REP(y,H)this->at(y)=vector<T>(W,v);
		}
		void setE(){
			Mat& A=*this;
			REP(y,H(A))REP(x,W(A))A[y][x]=Ae;
			REP(i,min(H(A),W(A)))A[i][i]=Me;		
		}
		//O(n^2)
		Mat operator+(const Mat& r){
			const Mat& l=*this;
			assert(H(r)==H(l) && W(l)==W(r));
			Mat res(H(l),W(r));
			REP(y,H(l))REP(x,W(r)) res[y][x]=A(l[y][x],r[y][x]);
			return res;
		}
		//O(n^2)
		Mat operator-(const Mat& r){
			const Mat& l=*this;
			assert(H(r)==H(l) && W(l)==W(r));
			Mat res(H(l),W(r));
			REP(y,H(l))REP(x,W(r)) res[y][x]=S(l[y][x],r[y][x]);
			return res;
		}
	    //O(LH*N*RW) O  (n^3)
		Mat operator*(const Mat& r){
			const Mat& l=*this;
			assert(H(r)==W(l));
			Mat res(H(l),W(r));
			REP(y,H(l))REP(x,W(r))
				REP(k,H(r)) res[y][x]=A(res[y][x],M(l[y][k],r[k][x]));
			return res;
		}
		
		//O(n^2)
		vector<T> operator*(const vector<T>& r){
			const Mat& l=*this;
			vector<T> res(r.size());
			REP(y,H(l))REP(x,W(l))res[y]=A(res[y],M(l[y][x],r[x]));
			return res;
		}

		// O(n^3*log(v))
		// Mat x must be n*n size
		Mat pow(ll v){
			Mat x=*this,res(H(x),W(x));
			res.setE();

			while(v!=0){
				if(v%2)res=res*x;
				x=x*x;
				v/=2;
			}
			return res;
		}

		// //verified by SRM306 LightSwitches
		// //次数を求める
		// //O(n^3)
		// template<typename T>
		// int rank(Mat<T> A){
		// 	 int H = H(A),W=W(A);
		// 	int py =0,px = 0;
		// 	while(py < H && px < W){
		// 		for(int y=py+1;y<H;y++){ // pivot
		// 			if(abs(A[y][px]) > abs(A[py][px])){
		// 				swap(A[y],A[py]);swap(b[y],b[py]);
		// 			}
		// 		}
		// 		if(abs(A[py][px]) > 0){
		// 			T d = inv(A[py][px]);
		// 			for(int x=0;x<W;x++) A[py][x] = mod(A[py][x] * d);
		// 			for(int y=py+1;y<H;y++){
		// 				T k = A[y][px];
		// 				for(int x=0;x<W;x++) A[y][x] = mod(A[y][x] - k * A[py][x]);
		// 			}
		// 			py++;
		// 		}
		// 		px++;
		// 	}
		// 	return py;
		// }
		

		
		// //連立方程式
		// const int gf=2;
		// T mod(T v){return mod(v,gf);}
		// T inv(T v){return invs[v];}

		//O(n^3)
		//Ax = b
		void gauss(vector<T>& b){
			Mat A=*this;
			const int H = H(A),W=W(A);
			int py =0,px = 0;
			while(py < H && px < W){
				for(int y=py+1;y<H;y++){ // pivot
					if(sig(abs(A[y][px]),abs(A[py][px]))>0){
						swap(A[y],A[py]);swap(b[y],b[py]);
					}
				}
				if(sig(A[py][px]) != 0){
					T d = Minv(A[py][px]);
					for(int x=0;x<W;x++) A[py][x] =M(A[py][x],d);
					b[py] = M(b[py],d);
					for(int y=py+1;y<H;y++){
						T k = A[y][px];
						for(int x=0;x<W;x++) A[y][x] = S(A[y][x],M(k,A[py][x]));
						b[y] = S(b[y],M(k,b[py]));
					}
					py++;
				}
				px++;
			}
			for(int y=py;y<H;y++)if(abs(b[y]) > 0)throw Inconsistent();
			if(py < W || px < W)throw Ambiguous();

			for(int x=W-1;x>=0;x--)for(int y=0;y<x;y++){
				b[y] = S(b[y],M(b[x],A[y][x]));
			}
		}


		// 行列A の逆行列を求める．
		// O(n^3)
		Mat inv(){
			Mat A=*this;//!

			int n=H(A);Mat B(n,n);
			REP(i,n){
				int pivot = i;
				for(int j = i + 1; j < n; j++){
					if( abs( A[j][i] ) > abs(A[pivot][i]) ) pivot = j;
				}
				if(sig(A[pivot][i])==0) throw NoSolution();
				swap( A[i], A[pivot] ); swap( B[i], B[pivot] );
				T d = A[i][i];
				REP(j,n){
					A[i][j] /= d; B[i][j] /= d;
				}
				REP(r,n){
					if( r == i )continue; double dif = A[r][i];
					REP(j,n){
						A[r][j] -= dif * A[i][j];
						B[r][j] -= dif * B[i][j]; 
					}
				}
			}
			return B;
		}

		// 行列A のdetを求める．
		//制約 N&#9747;N 行列
		T det(){
			const Mat A=*this;
			try{
				int n=H(A);
				Mat lu =decomposeLU();
				T mul = 1.0;
				REP(i,n)mul = mul * lu[i][i];
				return mul;
			}catch(NoSolution){
				return 0;
			}
		}

		// 行列A のLU分解を返す(L)．O(N^3)
		//制約 N&#9747;N 行列
		Mat decomposeLU(){
			const Mat& A=*this;int n = H(A);
			Mat LU(n,n);
			REP(r,n){
				//下三角
				for(int j = r;j < n;j++){
					T sum = 0;
					REP(k,j){
						sum = sum+LU[r][k]*LU[k][j];
					}
					LU[r][j] =A[r][j]-sum;
				}
				if(LU[r][r] == 0)throw NoSolution();
				T iv = inv(LU[r][r]);
				
				//上三角
				for(int i = r+1;i < n;i++){
					T sum = 0;
					REP(k,i){
						sum = sum+LU[i][k]*LU[k][r];
					}
					LU[i][r] = (A[i][r]-sum)*iv;
				}
			}
			return LU;
		}

		// //!!nocheck
		// //m項間漸化式…O(m^3*log(n))
		// //A[n]=ms[0]*A[n-1] + ... + ms[m-1]*A[n-m] + C
		// //A[0]=ss[0],...,A[m-1]=ss[m-1]
		// T getnth(ll n,const vector<T>& ss, const vector<T>& ms,T C=0){
		// 	int M=ss.size();
		//     //if(n<M)return ss[n];
		// 	Mat A(M+1,M+1,0);
			
		// 	REP(i,M-1)A[i+1][i]=1;
		// 	A[M][M]=1;

		// 	REP(i,M)A[0][i]=ms[i];
		// 	A[0][M]=C;
			
		// 	A=A.pow(n);
		// 	vector<T> sstmp=ss;sstmp.push_back(1);
		// 	return (A*sstmp)[0];
		// }
	};
}
using namespace Matrix;


int main(){
	ss<< fixed <<setprecision(3);
	cout <<fixed<<setprecision(3);

	while(!cin.eof()){
		D a,b,c,d,e,f;cin >> a >> b >> c >> d >> e >> f;

		Mat<D> m(2,2);
		m[0][0]=a;m[0][1]=b;
		m[1][0]=d;m[1][1]=e;

		vector<D> x(2);x[0]=c;x[1]=f;
		Mat<D> mat=m.inv();
		// REP(y,2)REP(x,2){
		// 	cout << mat[y][x]<<endl;
		// }
		m.gauss(x);
//		vector<D> res=m.inv()*x;REP(y,2)res[y]+=EPS;	
		cout << toString(x) <<endl;
		//cout <<u<<endl;

	}
}