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<algorithm>
#include<iomanip>
using namespace std;

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

vec gauss_jordan(const mat& A, const vec& b){
    int n = A.size();
    mat B(n, vec(n + 1));
    for(int i = 0 ; i < n ; ++i){
        for(int j = 0 ; j < n ; ++j){
            B[i][j] = A[i][j];
        }
    }
    for(int i = 0 ; i < n ; ++i){
        B[i][n] = b[i];
    }

    for(int i = 0 ; 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]);

        if(abs(B[i][i]) < EPS){
            return vec();
        }

        for(int j = i + 1 ; j <= n ; ++j){
            B[i][j] /= B[i][i];
        }

        for(int j = 0 ; j < n ; ++j){
            if(i != j){
                for(int k = i + 1 ; k <= n ; ++k){
                    B[j][k] -= B[j][i] * B[i][k];
                }
            }
        }
    }

    vec x(n);
    for(int i = 0 ; i < n ; ++i){
        x[i] = B[i][n];
    }

    return x;
}

int main(){
    mat A(2, vec(2));
    vec b(2);
    while(cin >> A[0][0] >> A[0][1] >> b[0] >> A[1][0] >> A[1][1] >> b[1]){
        vec ans = gauss_jordan(A, b);
        for(int i = 0 ; i < 2 ; ++i){
            if(i){
                cout << " ";
            }
            cout << fixed << setprecision(3) << ans[i];
        }
        cout << endl;
    }

    return 0;
}

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

int main() {
        int a, b, c, d, e, f;
        double x, y;
        char line[200];

        while(fgets(line, 200, stdin) != NULL) {
                sscanf(line, "%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f);
                x = ((double)e*c - b*f) / (a*e - d*b);
                y = ((double)a*f - d*c) / (a*e - d*b);
                printf("%.3f %.3f\n", x, y);
        }
}

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

int main(){
	int a,b,c,d,e,f;
	while(cin>>a>>b>>c>>d>>e>>f){
		double anx=0,any=0;
		if((c*e-f*b)!=0 && (a*e-d*b)!=0){
			anx=(c*e-f*b)/(a*e-d*b);
		}
		if((c*d-f*a)!=0 && (b*d-e*a)!=0){
			any=(c*d-f*a)/(b*d-e*a);
		}
		printf("%.3f ",anx);
		printf("%.3f\n",any);
	}
	return 0;
}

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

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

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


using namespace std;

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

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

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

C++: #include <stdio.h>

void Renritsu(double a,double b,double c,double d,double e,double f){
	double ta = a * d;
	double tb = b * d;
	double tc = c * d;
	double td = d * a;
	double te = e * a;
	double tf = f * a;
	td -= ta;
	te -= tb;
	tf -= tc;
	double y = tf / te;
	ta = a * e;
	tb = b * e;
	tc = c * e;
	td = d * b;
	te = e * b;
	tf = f * b;
	td -= ta;
	te -= tb;
	tf -= tc;
	double x = tf / td;
	printf("%.3lf %.3lf \n",x,y);
}


int main(void)
{
	Renritsu(1,2,3,4,5,6);
	Renritsu(2,-1,-2,-1,-1,-5);
return 0;
}

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

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

      while(cin >> a >> b >> c >> d >> e >> f)
      {
            a = a * d / a;
            b = b * d / a;
            c = c * d / a;

            d = d - a;           // d = 0
            e = e - b;
            f = f - c;

            e = e * b / e;
            f = f * b / e;

            b = b - e;            // b = 0
            c = c - f;

            a = a / a;
            c = c / a;            // x = c

            e = e / e;
            f = f / e;            // y = f

            cout << setprecision(4) << c << " " << setprecision(4) << f << endl;
      }

      return 0;
}

C++: //
//  main.cpp
//  Sample
//
//  Created by h3037183 on 2017/07/31.
//  Copyright ?? 2017??´ ?°????. All rights reserved.
//

#include <iostream>
#include<algorithm>
using namespace std;
int main(){
    double a,b,c,d,e,f,x,y;
    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);
    cout<<x<<" "<<y<<endl;
    return 0;
}

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

int gcd(int g,int h){
	if(h == 0)
		return g;
	return gcd(h, g % h);
}

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	int a, b, c, d, e, f;
	while(cin){
		cin >> a >> b >> c >> d >> e >> f;
		
		int g = f * b - c * e;
		int h = b * d - a * e;
		double x = (g / gcd(g, h)) / (h / gcd(g, h));
		int i = f * a - d * c;
		int j = -d * b + e * a;
		double y = (i / gcd(i, j)) / (j / gcd(i, j));
		cout << fixed << setprecision(3) << x << " " << y << endl;
	}
	return 0;
}

C++: #include<stdio.h>

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-a*f)/(b*d-a*e);
x=(c*e-b*f)/(a*e-b*d);

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

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

void func(double, int);

int main(){

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

	return 0;
}

void func(double x, int n){
	
	x *= pow(10, -n-1);
	x = round(x);
	x *= pow(10, n+1);	

}

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