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 <iostream>
#include <queue>
#include <cmath>

using namespace std;

int main ()
{
    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 = (a*f - c*d) / (a*e - b*d);
        x = round(x * 1000) / 1000;
        y = round(y * 1000) / 1000;
        if(fabs(x) < 1e-8) x = 0;
        if(fabs(y) < 1e-8) y = 0;
        printf("%.3f %.3f\n", x, y);
    }
    return 0;
}

C++: #include <stdio.h>

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

	while(scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f) != -1){
		

		ratio = -1 * ((double)d / (double)a);
		alpha = ratio * b;
		beta = ratio * c;
		//printf("%f %f %f\n", ratio, alpha, beta);

		y = (double)(beta + f) / (alpha + e);
		x = (double)(f - e * y) / d;

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

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

	return 0;
}

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


using namespace std;


double solveY(int a,int b,int c,int d,int e,int f){
	double ret;
	ret=(double)(a*f-d*c)/(a*e-b*d);
	return ret;
}

int main(){
	while(1){
		int a,b,c,d,e,f;
		if( !(cin>>a>>b>>c>>d>>e>>f) )break;
		double y=solveY(a,b,c,d,e,f);
		double x=(c-b*y)/a;
		printf("%5.3lf %5.3lf",x,y);
	}
	return 0;
}

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

int main()
{
	double a,b,c,d,e,f;
	while(true){
		cin >> a;
		if(cin.eof())
			break;
		cin >> b >> c >> d >> e >> f;
		double sum = a;
		a = a*d;
		b = b*d;
		c = c*d;
		d = d*sum;
		e = e*sum;
		f = f*sum;
		double x=0.0,y=0.0;
		y = (c-f)/(b-e);
		if(y==-0.0)
			y=0;
		x = (c-b*y)/a;
		if(x==-0.0)
			x=0;
		cout.precision(3);
		cout << fixed <<x;
		cout << ' ' ;
		cout.precision(3);
		cout << fixed << y;
		cout << endl;

	}
	return 0;
}

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

using namespace std;

int main(int argc, char *argv[]) {
  double a, b, c, d, e, f;

  while (cin >> a >> b >> c >> d >> e >> f) {
    a -= d * b / e;
    c -= f * b / e;
    double x = c / a;
    double y = (f - d * x) / e;
    if (x >= 0)
      x = (int)(x * 1000 + 0.5);
    else
      x = (int)(x * 1000 - 0.5);
    x /= 1000;
    if (y >= 0)
      y = (int)(y * 1000 + 0.5);
    else
      x = (int)(y * 1000 - 0.5);
    y /= 1000;

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

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

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

C++: #include<iostream>
#include<algorithm>
#include<cmath>
#include<cstdio>
using namespace std;
int main(){
	double a,b,c,d,e,f,n[20];
	while(cin>>a>>b>>c>>d>>e>>f){
	double x,y;
	int w;
	if(a == 0){
		n[0] = 0;
		n[1] = 0;
	}else{
		n[0] = c / a;
		n[1] = b / a;
	}
	if(d == 0){
		n[2] = 0;
		n[3] = 0;
	}else{
		n[2] = f / d;
		n[3] = e / d;
	}
	if(b == 0){
		n[4] = 0;
		n[5] = 0;
	}else{
		n[4] = c / b;
		n[5] = a / b;
	}
	if(e == 0){
		n[6] = 0;
		n[7] = 0;
	}else{
		n[6] = f / e;
		n[7] = d / e;
	}
	if(n[1] - n[3] == 0){
		y = 0;
	}else{
		y = (n[0] - n[2]) / (n[1] - n[3]);
	}
	if(n[5] - n[7] == 0){
		x = 0;
	}else{
		x = (n[4] - n[6]) / (n[5] - n[7]);
	}
	x = x * pow(10, - 5);
	double xx = x + 0.5;
	xx = xx * pow(10,5);
	y = y * pow(10, - 5);
	double yy = y + 0.5;
	yy = yy * pow(10,5);

	printf("%03f,%03f\n",&xx,&yy);



}
return 0;
}

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

int main(){
	double a,b,c,d,e,f,x,y;
	cout<<setprecision(3);
	cout<<fixed;
	while(cin>>a>>b>>c>>d>>e>>f){
		x=1.0/(a*e-b*d)*(e*c-b*f);
		y=1.0/(a*e-b*d)*(a*f-d*c);
		cout<<x<<" "<<y<<endl;
	}
	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){
        y = (f*a-c*d)/(e*a-b*d);
        x = (c-b*y)/a;
        printf("%.3lf %.3lf\n",x,y);
    }
}

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

using namespace std;

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

C++: #include <bits/stdc++.h>
using namespace std;

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

C++: #include <stdio.h>

int main(void) {
  double a, b, c, d, e, f;
  while(scanf("%lf%lf%lf%lf%lf%lf", &a, &b, &c, &d, &e, &f) != EOF) {
    double ax = a / e, cx = c / e;
    printf("%f ", (cx - f) / (ax - d));
    b /= d, c /= d;
    printf("%f\n", (c - f) / (b - e));
  }
  return 0;
}