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 <stdio.h>
double round3(double a){
	a=a*10000;
	if(int(a)%10>=5){
		a=a+10-int(a)%10;
	}else{
		a=a-int(a)%10;
	}
	a=a/10000;
	return a;

}
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){
		if(a==0){
			y=c/b;
			x=(f-e*y)/d;
		}else if(b==0){
			x=c/a;
			y=(f-d*x)/e;
		}else if(d==0){
			y=f/e;
			x=(c-b*y)/a;
		}else if(e==0){
			x=f/d;
			y=(c-a*x)/b;
		}else{
			y=(c*d-a*f)/(b*d-a*e);
			x=(c-b*y)/a;
		}
		
		x=round3(x);
		y=round3(y);
		
		printf("%0.3lf %0.3lf\n",x,y);
	}
	return 0;
}

C++: #include<iostream>

using namespace std;



int main(){

	double a, b, c, d, e, f, x, y;
	double thousand = 1000.000;

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

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

	x = x * pow(10.0, 3.0);
	x += 0.5;
	x = (int)x;
	x = (double)x/thousand;

	y = y * pow(10.0, 3.0);
	y += 0.5;
	y = (int)y;
	y = (double)y/thousand;

	cout << x << " " << y << endl;

	return 0;
}

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

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

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

int main()
{
	double a, b, c, d, e, f;
	while(std::cin >> a >> b >> c >> d >> e >> f) {
	double A = e;
	double B = - b;
	double D = - d;
	double E = a;
	double det = a * e - b * d;
	double x = (A * c + B * f) / det;
	double y = (D * c + E * f) / det;
		if ( -0.0005 < x && x <= 0 ) {
			x = - x;
				}
				if ( -0.0005 < y && y <= 0 ) {
			y = - y;
				}
		
		std::cout << std::fixed << std::setprecision(3) << x << " " << y << std::endl;
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
int a,b,c,d,e,f;
float A,B,C,D,E,F,X,Y;
while(cin>>a>>b>>c>>d>>e>>f){
E=e*a/d;
F=f*a/d;
Y=(c-F)/(b-E);
X=(c-b*Y)/a;
cout<<X<<Y<<endl;
}
}

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

int main(void){
	double a,b,c,d,e,f;
	//int X[2][2]={ {c,b}, {f,e} };
	//int Y[2][2]={ {a,c}, {d,f} };
	double x,y;
	double A,X,Y;
	while(cin>>a>>b>>c>>d>>e>>f){
		A=a*e-b*d;
		X=c*e-b*f;
		Y=a*f-c*d;
		x=(1/A)*X;
		y=(1/A)*Y;
		cout << fixed << setprecision(3) << x << ' ' << y 
	}
	
	return 0;
}

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

int main(){
        double a,b,c,d,e,f;
        while(std::cin >> a >> b >> c >> d >> e >> f){
                double p, q, x, y;
                p = a * e - d * b;
                q = c * e - f * b;
                x = q / p;
                p = b * d - e * a;
                q = c * d - f * a;
                y = q / p;
                std::cout << std::fixed << std::setprecision(3) << x << " " << y << std::endl;
        }
        return 0;
}

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

using namespace std;

double delta(double o, double p, double q , double r, double s, double t) {

	//cout << "o=" << o << "s=" << s << "v=" << "r=" << "o*s-p*r=" << (o*s-p*r)  << endl;

	// |o  p ||x|   |q|
	// |r  s ||y| = |t|

	return (o*s-p*r);//a???o b???p c???q d???r e???s f???t
}

double deltacfbe(double o, double p, double q , double r, double s, double t) {

	//cout << "o=" << o<< "s=" << s << "p=" << "r=" << "q*s-p*t=" << q*s-p*t  << endl;

	// x = |q  p | /delta
	//     |t  s | 

	return (q*s-p*t);
}

double deltaadcf(double o, double p, double q , double r, double s, double t) {

	//cout << "o=" << o<< "s=" << s << "p=" << "r=" << "o*t-q*r=" << o*t-q*r  << endl;

	// y = |o  q | /delta
	//     |r  t | 

	return (o*t-q*r);
}

int main() {

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

	cout.showpoint;



	cout << fixed << setprecision(3) << (deltacfbe(a,b,c,d,e,f)/delta(a,b,c,d,e,f))  << " " << (deltaadcf(a,b,c,d,e,f)/delta(a,b,c,d,e,f)) << endl;
	
	}

	return 0;
}

C++: #include<iostream>
int main() {
  float a[6];
  while(scanf("%1f %1f %1f %1f %1f %1f",&a[0],&a[1],&a[2],&a[3],&a[4],&a[5])!=EOF) {
  float x,y;
  x=(a[2]*a[4]-a[1]*a[5])/(a[0]*a[4]-a[1]*a[3]);
  y=(a[2]*a[3]-a[0]*a[5])/(a[1]*a[3]-a[0]*a[4]);
  printf("%.3f %.3f\n",x+0.000499999999,y+0.000499999999);
  }
}

C++: #include <stdio.h>

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

C++: #include <math.h>
#include <stdio.h>
#include <iostream>
#include <vector>

using namespace std;
/*
 * Simultaneous Equation
 * ax + by = c
 * dx + ey = f
 */
int main()
{
    vector <double> xlist;
    vector <double> ylist;
    double a, b, c, d, e, f;
    double x = 0,y = 0;
    while(cin >> a >> b >> c >> d >> e >> f)
    {
        double dA = a*e - b*d;
        if(dA == 0)
        {
            //Not Calc
            return -1;
        }
        x = 1/dA*(e*c-b*f);
        y = 1/dA*(-d*c+a*f);
        xlist.push_back(x);
        ylist.push_back(y);

    }
    for(int i; i < (int)xlist.size(); i++)
    {
        x = xlist[i];
        y = ylist[i];
        if(x == 0)
        {
            x = fabs(x);
        }
        if(y == 0)
        {
            y = fabs(y);
        }
        printf("%.3f %.3f\n",x,y);
    }

    return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  double a[2][3];
  while(cin>>a[0][0]>>a[0][1]>>a[0][2]>>a[1][0]>>a[1][1]>>a[1][2]){
    if(a[0][0]==0)
      for(int i=0;i<3;i++)swap(a[0][i],a[1][i]);
    for(int i=0;i<2;i++){
      for(int j=i+1;j<3;j++)
	a[i][j]/=a[i][i];
      a[i][i]=1;
      for(int j=0;j<2;j++){
	if(j==i)continue;
	double t=a[j][i];
	for(int k=i;k<3;k++)
	  a[j][k]-=t*a[i][k];
      }
    }
    printf("%.3f %.3f\n",a[0][2],a[1][2]);
  }
  return 0;
}

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

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

void solve(int a, int b, int c, int d, int e, int f) {
	double x = (f - (double)e*c/b) / (d - (double)e*a/b);
	double y = (c - a*x) / b;
	if (x == 0) x = 0.000;
	if (y == 0) y = 0.000;
	printf("%4.3f %4.3f\n", x, y);
}

int main() {
	int a, b, c, d, e, f;
	while (cin >> a >> b >> c >> d >> e >> f) {
		solve(a,b,c,d,e,f);
	}
	return 0;
}