Go: package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	var strs []string
	var a, b, c, d, e, f float64
	var x, y float64
	for scanner.Scan() {
		strs = strings.Split(scanner.Text(), " ")
		_a, _ := strconv.Atoi(strs[0])
		_b, _ := strconv.Atoi(strs[1])
		_c, _ := strconv.Atoi(strs[2])
		_d, _ := strconv.Atoi(strs[3])
		_e, _ := strconv.Atoi(strs[4])
		_f, _ := strconv.Atoi(strs[5])
		a = float64(_a)
		b = float64(_b)
		c = float64(_c)
		d = float64(_d)
		e = float64(_e)
		f = float64(_f)
		y = (c*d - f*a) / (d*b - a*e)
		x = (c - b*y) / a

		fmt.Printf("%.3f %.3f\n", x, y)
	}
}

C++: #include <iostream>
#include <algorithm>
#include <iomanip>
using namespace std;


int main() {
	float a,b,c,d,e,f;
	while(cin >> a >> b >> c >> d >> e >> f){
		float e2 =e*(a/d);
		float f2 =f*(a/d);
		d=a;
		float y=(c-f2)/(b-e2);
		float x=(c-b*y)/a;
		cout <<fixed;
		cout << setprecision(3) << x << " " << y << endl;

	}
	return 0;
}

C++: #include <iostream>
#include <iomanip>
using namespace std;

int main() {
	int number[6];
	double x, y;
	while (cin 
		>> number[0] >> number[1] >> number[2]
		>> number[3] >> number[4] >> number[5]) {
		y = (number[2] * number[3] - number[0] * number[5])
			/ (number[1] * number[3] - number[0] * number[4]);
		x = (number[2] - number[1] * y) / number[0];
		cout << fixed << setprecision(3) << x << flush;
		cout << " " << flush;
		cout << fixed << setprecision(3) << y << endl;
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main() {
    double a, b, c, d, e, f, x, y;
    while (cin >> a >> b >> c >> d >> e >> f) {
        x = (double)(c*e - b*f) / (a*e - b*d);
        y = (double)(c*d - a*f) / (b*d - a*e);
        cout << fixed << x << " " << fixed << y << endl;
    }
}

C++: #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
#define all(a)  (a).begin(),(a).end()
#define vi vector<int>
#define pb push_back
#define INF 999999999

const double EPS = 1e-8;
typedef vector<double> vd;
typedef vector<vd> mat;

//Ax=b????§£??? A?????£?????????
//?§£??????or????????§?????? ??´????????????0???vector?????????
vd gauss_jordan(const mat& A, const vd& b){
    int n=A.size();
    mat B(n,vd(n+1));
    rep(i,n) rep(j,n) B[i][j]=A[i][j];
    
    //??????A????????????b?????????????????????????????????
    rep(i,n) B[i][n] = b[i];
    
    rep(i,n){
        //??¨????????????????????°????????°?????¶???????????§????????????i??????????????£?????????
        int pivot = i;
        for(int j=i;j<n;j++){
            if(abs(B[j][i])>abs(B[pivot][i]))pivot = j;
        }
        swap(B[i],B[pivot]);
        
        //?§£??????or????????§??????
        if(abs(B[i][i])<EPS)return vd();
           
        //??¨????????????????????°????????°???1?????????
        for(int j=i+1;j<=n;j++)B[i][j]/=B[i][i];
        rep(j,n){
            if(i!=j){
                //j??????????????°????¶????
                for(int k=i+1;k<=n;k++)B[j][k]-=B[j][i]*B[i][k];
            }
        }
    }
    vd x(n);
    //??????????????????b????§£?????????
    rep(i,n)x[i]=B[i][n];
    return x;
}


int main(){
    int a,b,c,d,e,f;
    while(cin>>a>>b>>c>>d>>e>>f){
        vd vec;
        vec.pb(c);
        vec.pb(f);
        mat mvec;
        vd x,y;
        x.pb(a);
        x.pb(b);
        y.pb(d);
        y.pb(e);
        mvec.pb(x);
        mvec.pb(y);
        vd res = gauss_jordan(mvec, vec);
        printf("%.10lf %.10lf\n",res[0],res[1]);
    }
}

C++: #include <cstdio>
#include <iostream>
#include <cmath>
using namespace std;

double a, b, c, d, e, f;
void solve(double &x, double &y)
{
    if (b == 0)
    {
        x = c / a;
        y = (f - d * x) / e;
    }
    else
    {
        x = (b * f - e * c) / (b * d - e * a);
        y = (c - a * x) / b;
    }
}

int main()
{
    while (cin >> a >> b >> c >> d >> e >> f)
    {
        double x, y;
        solve(x, y);
        printf("%.3f %.3f\n", x, y);
    }
    return 0;
}

C++: #include <stdio.h>
#include <vector>
#include <utility>
#include <algorithm>
#include <iostream>
#include <limits>
#include <iomanip>
using namespace std;
#define rep(i,n) for(int i=0;i<n;++i)
#define ld long double
ld a, b, c, d, e, f, x, y;
ld shish(ld a)
{
	if (a == 0) { return a; }
	
	a *= 1000;
	if (a > 0) {
		a += 0.51;
	}
	else {
		a -= 0.51;
	}
	a = (ld)((int)a);
	a /= 1000;
	return a;
}
int main() {
	while (cin >> a >> b >> c >> d >> e >> f) {
		y = (a*f - c*d) / (ld)(a*e - b*d);
		x = (c*e - f*b) / (ld)(a*e - b*d);

		x = shish(x);
		y = shish(y);
		if (x == 0) { cout << "0.000"; }
		else {
			cout << fixed << setprecision(10) << x;
		}
		cout << " ";
		if (y == 0) { cout << "0.000" << endl; }
		else{
			cout << fixed << setprecision(10) << y << endl;
		}
	}
	return 0;
}

C++: #include <cstdio>

using namespace std;

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

C++: #include<iostream>
#include<string>
#include<iomanip>
using namespace std;
int main(){
	double a,b,c,d,e,f,x,y;
	while(cin>>a){
		cin>>b>>c>>d>>e>>f;
		x=(c*e-b*f)/(a*e-b*d);
		y=(c*d-a*f)/(b*d-a*e);
		if(x==-0)
			x=0;
		if(y==-0)
			y=0;
		cout<<fixed<<setprecision(3)<<x<<" ";
		cout<<fixed<<setprecision(3)<<y<<endl;
	}
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <cstdio>
#include <cmath>

using namespace std;

int main(void){
	double arr[6];
	vector<double> x,y;

	while (cin >> arr[0] >> arr[1] >> arr[2] >> arr[3] >> arr[4] >> arr[5]){
		double a = arr[0]; double b = arr[1]; double c = arr[2]; double d = arr[3]; double e = arr[4]; double f = arr[5];
		x.push_back((c*e-b*f)/(a*e-b*d));
		y.push_back((c*d-a*f)/(b*d-a*e));
	}
	for (unsigned int i=0; i<x.size(); ++i){
		printf("%.3lf %.3lf\n", round(x[i]), round(y[i]));
	}
	return 0;
}

C++: #include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <queue>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <fstream>
#include <stdio.h>
#include <complex>

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef pair<int, PII> TIII;
typedef long long LL;
typedef vector<LL> VLL;

//container util

//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define MT(a,b,c) MP(a, MP(b, c))

//repetition//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

int main(){
	double a,b,c,d,e,f;
	while(!cin.eof()){
		cin>>a>>b>>c>>d>>e>>f;
		cout << (c*e-b*f)/(a*e-b*d) << " " << (c*d-a*f)/(b*d-a*e) << endl;
	}
	return 0;
}