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 <iostream>
#include <cstdlib>
int main(void){
	double a,b,c,d,e,f,x,y;
	while(std::cin>>a>>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;
		printf("%.3f %.3f\n",x,y);
	}
}

C++: #include<stdio.h>
#include<iostream>
#include<iomanip>

#define REP(i, a) for(int i=0;i<(int)a;++i)
using namespace std;

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

int main() {
    solver();
    return 0;
}

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

int main() {
	// your code goes here

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

  while(cin >> a >> b >> c >> d >> e >> f ){

    double x = (c*e-b*f)/(double)(a*e-b*d);
    double y = (c*d-a*f)/(double)(b*d-a*e);

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

  }
	return 0;
}

C++: #include <stdio.h>
#include <iostream>
#include <algorithm>
#include <cmath>

using namespace std;

//substitution
int main() {

int a,b,c,d,e,f,x,y;

	while(1) {
		cin >> a >> b >> c >> d >> e >> f;
		if ( cin.eof() ) {
			break;
		}
	//a*x + b*y = c  and d*x + e*y = f
	
	 float y =(a*f - c*d)/(a*e - b*d);
	 float x =(c*e - b*f)/(a*e - b*d);
	
	cout << x << " " << y << endl;
	printf("%.3f ,%.3f\n", x,y);
	}

    return 0;
}

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

using namespace std;

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

C++: #include <stdio.h>

using namespace std;


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

	while(scanf("%lld %lld %lld %lld %lld %lld",&a,&b,&c,&d,&e,&f)!=EOF){
		if(c*e==b*f){
			x=0;
		}else{
			pre_x=(10000*(c*e-b*f))/(a*e-d*b);
			if((pre_x%10) >= 5){
				pre_x += (10-(pre_x%10));
			}
			x = pre_x/10000;
		}

		if(a*f==c*d){
			y=0;
		}else{
			pre_y=(10000*(a*f-c*d))/(a*e-b*d);
			if((pre_y%10) >= 5){
				pre_y += 10 - (pre_y%10);
			}
			y = pre_y/10000;
		}

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

    return 0;
}

C++: #include<iostream>


using namespace std;

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

		x=(e*c-f*b)/(e*a-b*d);
		y=(d*c-f*a)/(b*d-a*e);
		printf("%.3f %.3f\n",x,y);

	}
}

C++: #include <iostream>
#include <bitset>
#include <fstream>
#include <string>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <vector>
#include <algorithm>
#include <numeric>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <functional>
#include <cctype>
#include <list>
#include <limits>
#include <unordered_map>
#define Debug 0
//#include <boost/multiprecision/cpp_int.hpp>

const double EPS = (1e-10);


using namespace std;
using Int = long long;
//using namespace boost::multiprecision;

const Int MOD = 1000000007;

Int mod_pow(Int x, Int n) {
    Int res = 1;
    while(n > 0) {
        if(n & 1) res = (res * x) % MOD; //ビット演算(最下位ビットが1のとき)
        x = (x * x) % MOD;
        n >>= 1; //右シフト(n = n >> 1)
    }
    return res;
}

//最大公約数
template<typename T>
T gcd(T a, T b) {
    return b != 0 ? gcd(b, a % b) : a;
}

//最小公倍数
template<typename T>
T lcm(T a, T b) {
    return a * b / gcd(a, b);
}

vector<pair<double, double>> vans;
void solve(double *a, double *b) {
    double a2[3];
    double b2[3];
    a2[0] = a[0] * b[1];
    a2[2] = a[2] * b[1];
    b2[0] = b[0] * a[1];
    b2[2] = b[2] * a[1];
    double ans[2];
    if (a[1] && b[1]) {
        ans[0] = (a2[2]-b2[2])/(a2[0]-b2[0]); 
        ans[1] = ((a[2] - ans[0]*a[0]) / a[1]);
    } else {
        if (!a[1]) {
            ans[0] = a[2] / a[0];
            ans[1] = (b[2] - ans[0]*b[0]) / b[1];
        } else {
            ans[0] = b[2] / b[0];
            ans[1] = (a[2] - ans[0]*a[0]) / a[1];
        }
    }
    if (ans[0] == -0) ans[0] = 0;
    if (ans[1] == -0) ans[1] = 0;
    vans.push_back({ans[0], ans[1]});
}

int main(){
    double a[3], b[3];
    while (cin >> a[0]) {
        cin >> a[1];
        cin >> a[2];
        cin >> b[0];
        cin >> b[1];
        cin >> b[2];
        solve(a, b);
    }
    for (auto i: vans) {
        printf("%.3f %.3f\n", i.first, i.second);
    }
}

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



int main()
{
	double a[3], b[3];
	while (cin >> a[0] >> a[1] >> a[2] >> b[0] >> b[1] >> b[2])
	{
		if (a[0] == 0)
		{
			double c = a[2] / a[1];
			double d = (b[2] - b[1] * c) / b[1];
			a[2] = d;
			b[2] = d;
		}
		else
		{
			double c = 1;
			if (b[0] != 0)
			{
				c = a[0] / b[0];
				b[1] = b[1] * c - a[1];
				b[2] = b[2] * c - a[2];
			}
			b[2] /= b[1];
			b[1] = 1;
			a[2] -= b[2] * a[1];
			a[2] /= a[0];
		}
		if (a[2] < 0.0001 && a[2] > -0.0001)
			a[2] = 0.000;
		if (b[2] < 0.0001 && b[2] > -0.0001)
			b[2] = 0.000;

		cout << fixed << setprecision(3) << a[2] << b[2] << endl;
	}

	return 0;
}

C++: #include <iostream>
#include <string>
#include <map>
#include <vector>
#include <deque>
#include <algorithm>
#include <cmath>
#include <cstdio>
#define EPS 10e-6
#define rep(i, a, b) for(int i = a; i < b; i++)
using namespace std;
typedef long long ll;
int a, b, c, d, e, f;

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

C++: #include <cstdio>

using namespace std;

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

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

    return 0;
}

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

int main() {
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	cout.setf(ios::fixed);
	cout.precision(3);

	constexpr double EPS = 1e-7;

	for(double a, b, c, d, e, f; cin >> a >> b >> c >> d >> e >> f;) {
		double x, y;
		if(abs(e) < EPS) {
			x = (f - c * e / b) / (d - a * e / b);
			y = (c - a * x) / b;
		}
		else {
			x = (c - f * b / e) / (a - d * b / e);
			y = (f - d * x) / e;
		}

		cout << x << " " << y << endl;
	}

	return EXIT_SUCCESS;
}

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

int main()
{
    double a,b,c,d,e,f;
    double x,y;
    
    while(cin >> a >> b >> c >> d >> e >> f){
     if(b*d - a*e != 0)
         
         double tmp1 = (c*e - b*f),tmp2 = (a*e - b*d),tmp3 = (c*d - a*f),tmp4=(b*d - a*e);
        tmp1 = tmp1/tmp2;
        tmp2 = tmp3/tmp4;
        x = tmp1;
        y = tmp2;
         printf("%.3f %.3f",x,y);
    }
    return 0;
}