Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Split(bufio.ScanWords)
	for {
		data := nextInts(6)
		if data[0] == 0 || data[1] == 0 || data[2] == 0 || data[3] == 0 || data[4] == 0 || data[5] == 0 {
			break
		}
		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 ((c * e) - (b * f)) / ((a * e) - (b * d))
}

func GetY(a, b, c, d, e, f float64) float64 {
	return ((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>
#include <chrono>
using namespace std;

using _i64 = int64_t;
using _u64 = uint64_t;
using _f64 = double;

#define _for(i, start, end) for(_i64 i = (_i64)start; i < (_i64)end; ++i)
#define _rep(i, number) _for(i, 0, number)
#define _foreach(e, data) for(auto& e : data)
#define _all(data) data.begin(), data.end()

template<typename type>
_i64 _size(const type& data) { return static_cast<_i64>(data.size()); }
template<typename type, size_t size>
_i64 _size(const type (&)[size]) { return static_cast<_i64>(size); }

enum _flag : bool { able = true, disable = false };

struct _time {
    _time(_flag flag) { check = flag; if(!check) { return; } gettime(start); }
    ~_time() {
        if(!check) { return; }; gettime(end);
        _i64 elapse = chrono::duration_cast<chrono::milliseconds>(end - start).count();
        cout << endl << "Time: " << elapse << " ms" << endl;
    }
    private:
    using _timer = chrono::time_point<chrono::system_clock>;
    _timer start, end; bool check;
    void gettime(_timer& time) { time = chrono::system_clock::now(); }
};

struct _ini { _ini() { ios::sync_with_stdio(false); cin.tie(nullptr); } } _ini;

int main() {
    {
        _time time(disable);
        _f64 a, b, c, d, e, f, x, y;
        while(cin >> a >> b >> c >> d >> e >> f) {
            x = (c * e - f * b) / (a * e - d * b) + DBL_EPSILON;
            y = (c - a * x) / b + DBL_EPSILON;
            cout << fixed << setprecision(3) << x << " " << y << endl;
        }
    }
    return 0;
}

C++: #include<iostream>
#include<stdio.h>
#include<string.h>
#include<math.h>
using namespace std;

#define MAX 256

int main(void){

	float a, b, c, d, e, f;
	float ansx[MAX], ansy[MAX];

	int i = 0;

	while (scanf("%f%f%f%f%f%f%f", &a,&b,&c,&d,&e,&f) != EOF){
		if (a*e != b*d){
			ansx[i] = (c*e - b*f) / (a*e - b*d);
			ansy[i] = (c*d - a*f) / (b*d - a*e);
			if (((int)(ansx[i] * 10000) % 10) > 4 || ((int)(ansx[i] * 10000) % 10) < -4){
				ansx[i] += 0.001;
			}
			if (((int)(ansy[i] * 10000) % 10) > 4 || ((int)(ansx[i] * 10000) % 10) < -4){
				ansy[i] += 0.001;
			}
		}
		i++;
	}

	for (int j = 0; j < i; j++){
		printf("%.3f %.3f\n", ansx[j], ansy[j]);
	}
	
	return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<stdio.h>
using namespace std;
int main() {
	double a, b, c, d, e, f, x, y;
	while (!cin.eof()){
		cin >> a >> b >> c >> d >> e >> f;
		a *= e;
		c *= e;
		d *= b;
		f *= b;
		b *= e;
		e = b;
		if (c >= f) {
			x = (c - f) / (a - d);
		}
		else x = (f - c) / (d - a);
		y = (c - a*x) / b;
		if (x < 10){
			if (y < 10)
				printf("%1.3lf %1.3lf\n", x, y);
			else if (y < 100)
				printf("%1.3lf %2.3lf\n", x, y);
			else if (y < 1000)
				printf("%1.3lf %3.3lf\n", x, y);
		}
		else if (x < 100) {
			if (y < 10)
				printf("%1.3lf %1.3lf\n", x, y);
			else if (y < 100)
				printf("%2.3lf %2.3lf\n", x, y);
			else if (y < 1000)
				printf("%3.3lf %3.3lf\n", x, y);
		}
		else if (x < 1000)
		{
			if (y < 10)
				printf("%1.3lf %1.3lf\n", x, y);
			else if (y < 100)
				printf("%2.3lf %2.3lf\n", x, y);
			else if (y < 1000)
				printf("%3.3lf %3.3lf\n", x, y);
		}
	}
}

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

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

int main() {
	double a, b, c, d, e, f, x, y;

	cin >> a >> b >> c >> d >> e >> f;

	y = ( c * d  - a * f ) / ( b * d - a * e );
	if ( a ){
		x = ( c - b * y ) / a;
	}else{
		x = ( f - e * y ) / d;
	}

	cout << showpoint << setprecision(3);
	cout << setiosflags( ios::fixed );
	cout << ( x == -0.0 ? 0.0 : x ) << " " << ( y == -0.0 ? 0.0 : y ) << endl;
}

C++: #include <iostream>
#include <iomanip>
using namespace std;
int main() {
int a,b,c,d,e,f;
while (cin>>a>>b>>c>>d>>e>>f) {
 double Dx = c*e-b*f;
 double Dy = a*f-c*d;
 double D  = a*e-b*d;
 cout << fixed << setprecision(4) << Dx/D << ' ' << Dy/D << endl;
 }
return 0;
}

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

int main()
{
    double a,b,c,d,e,f,x,y;
    while(cin>>a>>b>>c>>d>>e>>f)
    {
        x=(c*e-b*f)/(a*e-b*d);
        y=(f-d*x)/e;
        x*=1000;
        if(x>0)x+=0.5;else x-=0.5;
        x=(int)x;
        x/=1000;
        y*=1000;
        if(y>0)y+=0.5;else y-=0.5;
        y=(int)y;
        y/=1000;
        if(abs(x)<1e-5)x=0;
        if(abs(y)<1e-5)y=0;
        printf("%.3lf %.3lf\n",x,y);
    }
    return 0;
}

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

int main(void) {
    double a, b, c, d, e, f;
    double x, y;
    
    while(cin >> a >> b >> c >> d >> e >> f) {
        y = (c*d - a*f) / (b*d - a*e);
        x = (c - b * y) / a;
        
        printf("%.3lf %.3lf", x, y);
        cout << endl;
    }
}

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

using namespace std;

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

    return 0;
}

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

using namespace std;

int main(void){
    int a,b,c,d,e,f;
    double ansX,ansY;
    while(std::cin >> a >> b >> c >> d >> e >> f){
        ansX = (c*e - b*f) / (a*e - b*d);
        ansX *= 1000;
        if(ansX > 0) ansX += 0.5;
        else ansX -= 0.5;
        ansX = int(ansX);
        ansX /= 1000;
        
        ansY = (a*f - c*d) / (a*e - b*d);
        ansY *= 1000;
        if(ansY > 0) ansY += 0.5;
        else ansY -= 0.5;
        ansY = int(ansY);
        ansY /= 1000;
        
        std::cout <<fixed << setprecision(3) << ansX << " " << fixed << setprecision(3)<<ansY << std::endl;
    }
    
}

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

int main() {
	double x,y,a,b,c,d,e,f;
	while(6 == scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)){
		x = (-b*f+e*c)/(a*e-b*d);
		y = (f-d*x)/e;
		if(x == 0){
        	x = 0.000;
	    }
		if(y == 0){
        	y = 0.000;
		}

		printf("%.3f %.3f\n",x,y);
	}
	return 0;
}