Go: package main

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

var sc = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)

func main() {
	sc.Split(bufio.ScanWords)
	defer out.Flush()
	for {
		data := nextInts(6)
		fmt.Printf("%.3f\n", Round(GetX(data[0], data[1], data[2], data[3], data[4], data[5]), 3))
		fmt.Printf("%.3f\n", Round(GetY(data[0], data[1], data[2], data[3], data[4], data[5]), 3))
	}
}

func GetX(a, b, c, d, e, f float64) float64 {
	return float64(((c * e) - (b * f)) / ((a * e) - (b * d)))
}

func GetY(a, b, c, d, e, f float64) float64 {
	return float64(((c * d) - (a * f)) / ((b * d) - (a * e)))
}

func Round(f float64, places int) float64 {
	shift := math.Pow(10, float64(places))
	return math.Floor(f*shift+.5) / shift
}

func next() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() float64 {
	a, _ := strconv.Atoi(next())
	return float64(a)
}

func nextInts(n int) []float64 {
	a := make([]float64, n)
	for i := 0; i < n; i++ {
		a[i] = nextInt()
	}
	return a
}

C++: #include "bits/stdc++.h"
using namespace std;
#ifdef _DEBUG
#include "dump.hpp"
#else
#define dump(...)
#endif

//#define int long long
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define all(c) begin(c),end(c)
const int INF = sizeof(int) == sizeof(long long) ? 0x3f3f3f3f3f3f3f3fLL : 0x3f3f3f3f;
const int MOD = 1'000'000'007;
template<class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return true; } return false; }
template<class T> bool chmin(T &a, const T &b) { if (b < a) { a = b; return true; } return false; }

// ガウスの消去法（Gauss elimination）
// O(n^3)
// 
// Verified:
//   http://judge.u-aizu.ac.jp/onlinejudge/review.jsp?rid=3437138

using Num = double;
using Vec = vector<Num>;
using Mat = vector<Vec>;
tuple<bool, int, Vec> gaussianElimination(Mat A, Vec b) {
	const Num EPS = 1e-5; // 誤差
	const int n = A.size(), m = A[0].size();
	int rank = 0, cj = 0;
	while (rank < n && cj < m) {
		// A[rank][cj] が最大になるように
		for (int i = rank + 1; i < n; i++) {
			if (abs(A[i][cj]) > abs(A[rank][cj])) {
				A[i].swap(A[rank]);
				swap(b[i], b[rank]);
			}
		}
		if (abs(A[rank][cj]) > 0) {
			// 係数を 1 に
			Num d = A[rank][cj];
			for (int j = 0; j < m; j++)
				A[rank][j] /= d;
			b[rank] /= d;
			// 前進消去（forward elimination）
			for (int i = rank + 1; i < n; i++) {
				Num k = A[i][cj];
				for (int j = 0; j < m; j++)
					A[i][j] -= k * A[rank][j];
				b[i] -= k * b[rank];
			}
			rank++;
		}
		cj++;
	}
	// 0 != b[i] だったら不能
	for (int i = rank; i < n; i++)
		if (abs(b[i]) > EPS)
			return make_tuple(false, rank, Vec());
	// 不定
	// rank != m
	// cj < m => n < m
	if (rank < m || cj < m)
		return make_tuple(true, rank, Vec());
	// 後退代入（back substitution）
	for (int j = m - 1; j >= 0; j--)
		for (int i = 0; i < j; i++)
			b[i] -= b[j] * A[i][j];
	return make_tuple(true, rank, b);
}

signed main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	cout << fixed << setprecision(3);
	for (double a, b, c, d, e, f; cin >> a >> b >> c >> d >> e >> f;) {
		Mat A = { { a,b },{ d,e } };
		Vec B = { c,f };
		auto res = gaussianElimination(A, B);
		Vec ans = get<2>(res);
		cout << ans[0] << " " << ans[1] << endl;
	}
	return 0;
}

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

int main(){
    double a,b,c,d,e,f;
    cin>>a>>b>>c>>d>>e>>f;

    double temp=b/e;
    double x,y;
    x=(c-temp*f)/(a-temp*d);
    temp=a/d;
    y=(c-temp*f)/(b-temp*e);
    cin>>a>>b>>c>>d>>e>>f;
    double x2,y2;
    temp=b/e;
    x2=(c-temp*f)/(a-temp*d);
    temp=a/d;
    y2=(c-temp*f)/(b-temp*e);


    cout.setf(ios::fixed);
    cout.precision(3);
    cout<<x<<" "<<y<<endl;
    cout<<x2<<" "<<y2;

    return 0;
}

C++: #include <stdio.h>
#include <math.h>

int main(int argc, char** argv)
{
  double a, b, c, d, e, f;
  
  while (fscanf(stdin, "%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) == 6) {
    double x = (c * e - b * f) / (a * e - b * d);
    double y = (f - d * x) / e;
    
    x = fabs(x) < 0.001 ? 0.0 : x;
    y = fabs(y) < 0.001 ? 0.0 : y;

    fprintf(stdout, "%.3lf %.3lf\n", x, y);
  }
}

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

int main(void) {
    int a,b,c,d,e,f;
    float x,y;
    while (1){
        cin >> a;
        if (cin.eof())
            break;
        cin >> b >> c >> d >> e >> f;
        x=(e*c-b*f)/(a*e-b*d);
        y=(-d*c+a*f)/(a*e-b*d);
        printf("%.3f %.3f\n",x,y);
    }
    return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <cmath>
using namespace std;
int main(){
    double a,b,c,d,e,f;
    while(cin >> a >>b >> c >> d >> e >> f){
    double det,x,y;
    det = a*e-b*d;
    x = (e*c-b*f)/det;
    y = (-c*d+a*f)/det;
    if (x==0)
        x = fabs(x);
    if (y==0)
        y = fabs(y);
    printf("%.3f\t%.3f\n",x,y);}
}

C++: #include <iostream>
#include <iomanip>

int main(int argc, char const *argv[]){
	
	double a,b,c,d,e,f;

	while(std::cin >> a >> b >> c >> d >> e >> f){
		double y = (a*f-c*d)/(a*e-b*d);
		double x = (c-b*y)/a;
		std::cout << std::fixed << std::setprecision(3) << x << " " << y << std::endl;
	}

	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;

typedef long long int ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pair<int, int> > vii;
#define rrep(i, m, n) for(int (i)=(m); (i)<(n);  (i)++)
#define  rep(i, n)    for(int (i)=0; (i)<(n);  (i)++)
#define  rev(i, n)    for(int (i)=(n)-1; (i)>=0; (i)--)
#define vrep(i, c)    for(__typeof((c).begin())i=(c).begin(); i!=(c).end(); i++)
#define  ALL(v)       (v).begin(), (v).end()
#define mp            make_pair
#define pb            push_back
template<class T1, class T2> inline void minup(T1& m, T2 x){ if(m>x) m=static_cast<T2>(x); }
template<class T1, class T2> inline void maxup(T1& m, T2 x){ if(m<x) m=static_cast<T2>(x); }

#define INF 1000000000
#define MOD 1000000009
#define EPS 1E-9

double a, b, c;
double d, e, f;

int main()
{
  while(cin >> a >> b >> c >> d >> e >> f){
    double x = (e*c-b*f) / (e*a-b*d);  if(abs(x) < EPS) x = 0.0;
    double y = (c*d-a*f) / (b*d-a*e);  if(abs(y) < EPS) y = 0.0;
    printf("%.3f %.3f\n", x, y);
  }

  return 0;
}

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("%.3lf %.3lf\n",res[0],res[1]);
    }
}