Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func gcd(num1, num2 int) int {
	if num2 == 0 {
		return num1
	}
	num3 := num1 % num2
	return gcd(num2, num3)
}

func lcm(num1, num2 int) int {
	if num1%num2 != 0 {
		num3 := gcd(num1, num2)
		for i := 1; ; i++ {
			check := num3 * i
			if check%num1 == 0 && check%num2 == 0 {
				return check
			}
		}
	} else {
		return num1
	}
}

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	for scanner.Scan() {
		strNums := strings.Fields(scanner.Text())
		nums := []int{}
		for _, strNum := range strNums {
			num, _ := strconv.Atoi(strNum)
			nums = append(nums, num)
		}
		a := nums[0]
		b := nums[1]
		c := nums[2]
		d := nums[3]
		e := nums[4]
		f := nums[5]
		lcm := lcm(a, d)
		mulA := lcm / a
		mulD := lcm / d
		a *= mulA
		b *= mulA
		c *= mulA
		d *= mulD
		e *= mulD
		f *= mulD

		if d < 0 {
			d *= -1
			e *= -1
			f *= -1
		}

		bE := b - e
		cF := c - f
		y := float64(cF) / float64(bE)
		x := (float64(c) - (y * float64(b))) / float64(a)

		if x == 0 {
			fmt.Printf("%.3f ", 0.0)
		} else {
			fmt.Printf("%.3f ", x)
		}
		if y == 0 {
			fmt.Printf("%.3f\n", 0.0)
		} else {
			fmt.Printf("%.3f\n", y)
		}
	}
}

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
using i32=int;using i64=long long;using ll =i64;
using uint=unsigned int;using ull=unsigned long long;
template<typename T> using matrix=vector<vector<T> >;

#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;

	D inv(D v){ return 1.0/v;};

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

namespace Matrix{
    using namespace _double_tmpl;

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

	class NoSolution{
	};

	
	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;}
		
		static constexpr T Ae=0.0;
		T A(T a,T b){return a+b;}T S(T a,T b){return a-b;}

		static constexpr T Me=1.0;
		T M(T a,T b){return a*b;}

		// I を生成
		Mat(int H,int W) : vector<vector<T>>(H){
			REP(y,H)this->at(y)=vector<T>(W);
			REP(y,H)REP(x,W)this->at(y)[x]=Ae;
			REP(i,min(H,W)) this->at(i)[i]=Me;
		}
		Mat(int H,int W,int v) : vector<vector<T>>(H){
			REP(y,H)this->at(y)=vector<T>(W,v);
		}

		//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){
			auto& 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<T> pow(ll v){
			Mat<T> x=*this,res(H(x),W(x));
			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){
			const 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(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] = pmod(A[py][x] * d);
					b[py] = pmod(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] = pmod(A[y][x] - k * A[py][x]);
						b[y] = pmod(b[y] - 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] = mod(b[y] - 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++){
					ll 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()){
		double a,b,c,d,e,f;cin >> a >> b >> c >> d >> e >> f;

		Mat<double> 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;
		vector<D> res=m.inv()*x;		
		cout << toString(res) <<endl;
		//cout <<u<<endl;

	}
}