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)
		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<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;
}

C++: #include<iostream>
#include<cstdio>
#include<iomanip>
#include<vector>
#include<math.h>
using namespace std;
class SimultaneousEquation{ 
    public:
        void solve(int a,int b,int c,int d,int e,int f){ 
            double x,y;
            x=double(c*e-b*f)/(a*e-b*d);
            y=double(c*d-a*f)/(b*d-a*e);
            printf("%.3lf %.3lf\n",fabs(x),fabs(y));
            }
};
int main(){ 
    int a,b,c,d,e,f;
    SimultaneousEquation inst;
    while(cin>>a>>b>>c>>d>>e>>f){
        inst.solve(a,b,c,d,e,f);
    }
}

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

int main(){
	float a, b, c, d, e, f, x, y;
	while(cin >> a >> b >> c >> d >> e >> f){
		x = (b * f - c * e) / (b * d - a * e);
		y = (c - a * x) / b;
	}
	if(x > 0) {
		x += 0.0005;
	}
	else if(x < 0){
		x -= 0.0005;
	}
	if(y > 0){
		y += 0.0005;
	}
	else if(y < 0){
		y -= 0.0005;
	}
	cout << fixed << setprecision(3) << x << ' ' << y << endl;
	return 0;
}

C++: #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 y = (c / a - f / d) / (b / a - e / d);
        auto x = (c - b * y) / a;
        cout<<fixed;
        cout<<setprecision(3);
        cout<<x<<" "<<y<<endl;
    }
}

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