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 <cmath>
#include <string>
#include <sstream>
#include <iostream>
#include <algorithm>

int main(void) 
{
    std::string str;
    double a, b, c, d, e, f;
    double x, y;

    while (getline(std::cin, str)) {
        std::istringstream str_s(str);

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

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

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

        x = (double)round(x*1000)/1000;
        y = (double)round(y*1000)/1000;

        std::cout.setf(std::ios::fixed);  
        std::cout.precision(3);

        std::cout << std::showpoint << x << ' ' << y << '\n';
    }

    return 0;
}

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

int main()
{
	double A, B, C, D, E, F, X, Y, G , H;

	while(cin >> A >> B >> C >> D >> E >> F)
	{
		G = A / D;
		D *= G;
		E *= G;
		F *= G;
		Y = (F-C) / (E-B);
		
		D /= G;
		E /= G;
		F /= G;
		H = B / E;
		D *= H;
		E *= H;
		F *= H;
		X = (F-C) / (D-A);

		if(static_cast<int>(Y*100000)%100>=49 && static_cast<int>(Y*100000)%100<=50 && Y<0){
			Y += 0.0001;
		}

		if(static_cast<int>(-1*X*100000)%100>=49 && static_cast<int>(-1*X*100000)%100<=50 && X<0){
			X += 0.0001;
		}

		if(Y>-0.0005 && Y<=0.0){
			Y=0;
		}

		if(X>-0.0005 && X<=0.0){
			X=0;
		}

		cout<<fixed<<setprecision(3)<<X<<" "<<fixed<<setprecision(3)<<Y<<endl;
	}

	return 0;
}

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

double deter(double a, double b, double c, double d) {
	return a * d - b * c;
}

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

	double det;

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

		det = deter(a, b, d, e);

		printf("%.3lf ", deter(c, b, f, e) / det);
		printf("%.3lf\n", deter(a, c, d, f) / det);



		
	}

	//system("pause");
	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cmath>
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", round(x * 1000)/1000, round(y*1000)/1000);
  }
  return 0;
}

C++: #include <iostream>
#include <iomanip>
using namespace std;
int main( void )
{
	while ( !cin.eof() )
	{
		int a, b, c, d, e, f;
		cin >> a >> b >> c >> d >> e >> f;
		if ( cin.eof() )
			break;

		double delta = 1.0 / ( a*e - b*d );

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

		if ( x == 0.0 )
			x = 0.0;
		if ( y == 0.0 )
			y = 0.0;

		cout << setprecision(3) << setiosflags(ios::fixed) << x << " " << y << endl;

	}

	return 0;
}

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

int main() {
	//ax + by = c
	//dx + ey = f

	int A, B, C, D, E ,F = 0;
	cin >> A >> B >> C >> D >> E >> F;

	int COMMON_A = D;
	int COMMON_B = A;
	
	A *= COMMON_A;
	B *= COMMON_A;
	C *= COMMON_A;
	D *= COMMON_B;
	E *= COMMON_B;
	F *= COMMON_B;

	int X,Y;
	Y = (E-B);
	if((F-C) == 0 && (E-B) < 0)
		Y = -Y;
	float y = (F-C) / (E-B);

	X = (C-B*y);

	float x;
	x = (C- B * y) / A;
	if (X == 0 && A < 0)
		x = -x;

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

	return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main()
{
  double a,b,c,d,e,f,x,y;
  while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f) != EOF){
    x = (c-b*(c*d-a*f)/(b*d-a*e))/a; 
    y = (c*d-a*f)/(b*d-a*e);
    if(x == -0)x = 0;
    if(y == -0)y = 0;
    scanf("%3f %3f",&x,&y);
  }
}

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

using namespace std;
int main(){
    float a,b,c,d,e,f;
    while((cin>>a>>b>>c>>d>>e>>f)){
        float x = (c*e-b*f)/(a*e-b*d);
        float y = (c*d-a*f)/(b*d-a*e);
        x = round(1000*x) / 1000;
        y = round(1000*y) / 1000;
        printf("%.3f %.3f",x,y);
    }
    return 0;
}

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

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

C++: #include<cstdio>

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

C++: #include <iostream>
#include <cstdio>
#include <vector>
#include <list>
#include <algorithm>
#include <cmath>
#include <stack>
#include <set>
using namespace std;

#define REP(i,n) for(int (i)=0; (i)<(n); (i)++)
#define FOR(i,a,b) for(int (i)=(a); (i)<(b); (i)++)
#define PUSH(n,v) for(int i=0; i<(n); i++) {int j; cin >> j; v.push_back(j);}
#define ALL(v) v.begin(), v.end()

typedef pair<double, double> XY;

XY solve(double a, double b, double c, double d, double e, double f) {
    double x, y;
    x = (c*e - b*f)/(a*e - b*d);
    y = (a*f - c*d)/(a*e - b*d);
    return make_pair(x,y);
}

int main() {
    double a,b,c,d,e,f;
    while(cin >> a >> b >> c >> d >> e >> f) {
        double x, y;
        XY xy = solve(a,b,c,d,e,f);
        x = xy.first;
        y = xy.second;
        printf("%.3f %.3f\n", round(1000 * x)/1000., round(1000 * y)/1000.);
    }
    return 0;
}

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

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

int main(){
int a,b,c,d,e,f,Ax,Ay;
float x,y;
while(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);
Ax=x*100000;
Ay=y*100000;
Ax+=5;
Ay+=5;
Ax/=10;
Ay/=10;
cout<<x<<" "<<y<<endl;}
}

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

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

C++: #include<stdio.h>
int main(void){
    double a,b,c,d,e,f,x,y,box1,box2,box3,box4;
    while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!=EOF){
    box1=c*d;
    box2=a*f;
    box1=box1-box2;
    box3=b*d;
    box4=a*e;
    box2=box3-box4;
    y=box1/box2;
    box3=b*y;
    box4=c-box3;
    x=box4/a;
    x=x*10000+4;
    x=x/10000;
    y=y*10000+4;
    y=y/10000;
    }
return 0;
}