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 <cstdio>
#include <cmath>
using namespace std;

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

    while(cin >> a >> b >> c >> d >> e >> f)
    {
        det = (double) (a*e-b*d);
        det = 1.0 /det;
        x = ((double)(c * e - b * f))  * det;
        x = ceil(1000.0*x-0.5) /1000.0;
        y = ((double)(a * f - c * d)) * det;
        y = ceil(1000.0*y-0.5) /1000.0;
        if(abs(x) < 0.0001) x =0.0;
        if(abs(y) < 0.0001) y =0.0;
        printf("%.3lf %.3lf\n", x, y);
    }
    return 0;
}

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


int main() {
	float a,b,c,d,e,f;
	while(cin >> a >> b >> c >> d >> e >> f){
		float e2 =e*(a/d);
		float f2 =f*(a/d);
		d=a;
		float y=(c-f2)/(b-e2);
		float x=(c-b*y)/a;
		x*=1000;
		y*=1000;
		x=int(x+.5-(x<0));
		y=int(y+.5-(y<0));
		x*=(1/1000);y*=(1/1000);
		cout <<fixed;
		cout << setprecision(3) << x << " " << y << endl;

	}
	return 0;
}

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

int main(){
	int a11=0,a12=0,c=0,a21=0,a22=0,f=0;
	while(cin>>a11){
		cin>>a12>>c>>a21>>a22>>f;
		double x,y,delta=((double)a11*a22-(double)a12*a21);
		x=((double)a22*c-(double)a12*f)/delta;
		y=((double)a11*f-(double)c*a21)/delta;
		if(x>0){x=(double)(((int)((x*1000)+0.5))/1000);
		}else{x=(double)(((int)((x*1000)-0.5))/1000);}
		if(y>0){y=(double)(((int)((y*1000)+0.5))/1000);
		}else{y=(double)(((int)((y*1000)-0.5))/1000);}
		cout<<x<<" "<<y<<endl;
	}
	return 0;
}

C++: #include <stdio.h>


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

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

using namespace std;

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

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

	return 0;
}

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

void OutputSolution(int a, int b, int c, int d, int e, int f)
{
    long double x, y;
	if(b == 0){
		x = c / a;
		y = (f-d*x) / e;
	}else{
		int B = b;
		a *= e;
		b *= e;
		c *= e;
		d *= B;
		e *= B;
		f *= B;
		x = (c-f) / (a-d);
		y = (c-a*x) / b;
	}
	cout << fixed << setprecision(3) << x << ' ' << y << endl;
}

int main()
{
	while(true){
		int a, b, c, d, e, f;
		cin >> a >> b >> c >> d >> e >> f;
		if(cin.eof()) break;
		OutputSolution(a, b, c, d, e, f);
	}
	return 0;
}

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

using namespace std;

#define rep(i, n) for (int i = 0; i < int(n); ++i)

int main() {
  double a, b, c, d, e, f;
  while (cin >> a >> b >> c >> d >> e >> f) {
    a *= e;
    c *= e;
    d *= b;
    f *= b;
    b = e = b * e;
    a -= d;
    c -= f;
    double x = c / a;
    double y = (f - d * x) / e;
    x = double(round(x * 1000)) / 1000;
    y = double(round(y * 1000)) / 1000;
    if (abs(x) < 0.0001) x = 0;
    if (abs(y) < 0.0001) y = 0;
    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 = (f-(d*c)/a)/(e-(d*b)/a);
  x = (c-b*y)/a;
  cout << fixed << setprecision(3) << x << " " << y << endl;
  cin >> a >> b >> c >> d >> e >> f;   
  y = (f-(d*c)/a)/(e-(d*b)/a);
  x = (c-b*y)/a;

  cout << fixed << setprecision(3) << x << " " << y << endl;
    
    
    
  return 0;

}

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

double halfadjust(double x){
	int tmp = (x*10000);
	tmp = tmp%10;
	double ans = static_cast<double>(static_cast<int>(x*1000));
	ans = ans/1000;
	if(tmp >= 5)
		ans += 0.001;
	if(tmp <= -5)
		ans -= 0.001;
	return ans;
}

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

void solve(){
	using namespace std;
	double x = (c*e-b*f)/(a*e-b*d);
	double y = (c*d-a*f)/(b*d-a*e);
	cout << setprecision(3) << fixed << halfadjust(x) << ' ';
	cout << halfadjust(y) << endl;
	cout << setprecision(6);
}

int main(){
	while(true){
		std::cin >> a >> b >> c >> d >> e >> f;
		if((!a&&!b)||(!d&&!e))
			break;
		solve();
	}
	return 0;
}

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

int main(void){

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

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

}

C++: #include<iostream>
#include<string.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);
    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);
		printf("%.3f %.3f\n", x, y);
	}
	return 0;
}

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

int main() {
  double a, b, c, d, e, f, x, y, det;
  while(cin >> a >> b >> c >> d >> e >> f) {
    det = 1.0/(a*e - b*d);
    x = (c*e - b*f)*det;
    y = (a*f - c*d)*det;

    if(x == 0) x = 0;
    if(y == 0) y = 0;

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

  return 0;
}

C++: #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*e-b*f)/(a*e-b*d);
		y = (c-a*x)/b;
		printf("%.3f %.3f\n", x, y);
	}
	return 0;
}