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

C++: #include <iostream>
#include <iomanip>
int main(void){
	int a,b,c,d,e,f;
	while(std::cin>>a>>b>>c>>d>>e>>f){
		double y=(a*f-c*d)/(a*e-b*d),x=(c-b*y)/a;
		std::cout<<std::fixed<<std::setprecision(3)<<(x==0?0:x)<<" "<<(y==0?0:y)<<"\n";
	}
}

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

#define ROUND_RANK 4
#define EPS 1e-8
//ax+by=c
//dx+ey=f

//行列式の算出
double Calc_det(const double& p11, const double& p12, const double& p21, const double& p22) {
	return (p11*p22 - p12*p21);
}
//xの解の算出
double Calc_x(const double& det, const double& q1, const double& p22, const double& p12, const double& q2) {
	return ((q1*p22 - p12*q2) / det);
}
//yの解の算出
double Calc_y(const double& det, const double& q2, const double& p11, const double& q1, const double& p21) {
	return ((q2*p11 - p21*q1) / det);
}
//少数点以下第rank位で四捨五入
double Round(const double& value, const int& rank) {
	int root = pow(10, rank);
	return (std::round(value*root) / root);
}

int main() {
	double	a, b, c, d, e, f;//データセット
	double  det;//行列式
	double	x, y;//解
	while (std::cin >> a >> b >> c >> d >> e >> f) {
		det = Calc_det(a, b, d, e);
		det = fabs(det);
		x = Calc_x(det, c, e, b, f);
		y = Calc_y(det, a, f, c, d);
		x = Round(x, ROUND_RANK);
		y = Round(y, ROUND_RANK);
		std::cout << std::fixed;
		std::cout << std::setprecision(3) << x + EPS << " " << y + EPS;
	}	
}

C++: #include <iostream>
#include <vector>
#include <algorithm>

#define rep(x,to) for(x=0;x<to;x++)
#define rep2(x,from,to) for(x=from;x<to;x++)

using namespace std;


int main(void){

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

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

int main(){

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

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

		float det = a * e - b * d;

		float dx = c * e - b * f;
		float dy = a * f - c * d;

		float x = dx / det;
		float y = dy / det;

		if( x == -0.000 )x = 0.000;
		if( y == -0.000 )y = 0.000;

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

	return 0;
}

C++: #include <stdio.h>
float round3(float a){
	a=a*10000;
	if(int(a)%10>5){
		a=a+10-int(a)%10;
	}else{
		a=a-int(a)%10;
	}
	
	a=double (int (a/10));
	a=a/10000;

}
int main(){
	int a,b,c,d,e,f;
	double x,y;
	while((scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f))!=EOF){
		if(a*e==b*d){
		}else{
			x=(c*e-b*f)/(a*e-b*d);
			y=(c*d-a*f)/(b*d-a*e);
		}
		x=round3(x);
		y=round3(y);
		printf("%0.3lf %0.3lf\n",x,y);
	}
	return 0;
}

C++: #include<cstdio>
#include<vector>
#include<algorithm>
using namespace std;
int main(void){
	long long a, b, c, d, e, f;
	long long p, q, r;
	long long x, y, z;
	for (; scanf("%lld %lld %lld %lld %lld %lld", &a, &b, &c, &d, &e, &f) !=EOF;){
		c = c * 1000;
		f = f * 1000;
		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;
		printf("%lld.%03lld %lld.%03lld\n", x / 1000, x % 1000, y / 1000, y % 1000);
	}

		return 0;
	}

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

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

	scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f);

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

	printf("%.3lf% .3lf",x,y);

	return 0;
}

C++: #include <cstdio>

using namespace std;

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

C++: #include<stdio.h>
int main(void){

	double a, b, c, d, e, f;
	double A,B;
	double x, y;

	while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF){
		 
	 
	 if ( (a >= 0 && d <=　0)|| (a >= 0 && d >= 0)) {
		A = c*d - f*a;
		B = b*d - e*a;
        y = A / B;
    }
    
    else if ((a < 0 && d > 0) || (a < 0 && d < 0)) {
		A = c*d + f*a;
		B = b*d + e*a;
        y = A / B;
    }


    x = (c - y * b) / a;
	printf("%.3f %.3f\n" ,x , y);
	}
	return 0;

}

C++: #include<stdio.h>
int main(){

double a,b,c,d,e,f,x,y,dd;
y=0;x=0;
 while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF){
dd=e*a-b*d;
if(dd!=0;){
y=(d*c-a*f)/(b*d-a*e);
x=(e*c-b*f)/(e*a-b*d);
x=(x==fabs(x))?fabs(x):x; 
y=(y==fabs(y))?fabs(y):y; 


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

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

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    vector<double> a, b, c, d, e, f;
    int i = 0;
    while(cin) {
        double ai, bi, ci, di, ei, fi;
        cin >> ai >> bi >> ci >> di >> ei >> fi;
        a.push_back(ai);
        b.push_back(bi);
        c.push_back(ci);
        d.push_back(di);
        e.push_back(ei);
        f.push_back(fi);
        i++;
    }
    
    for(int j=0; j+1<i; j++) {
        double ai = a[j];
        double bi = b[j];
        double ci = c[j];
        double di = d[j];
        double ei = e[j];
        double fi = f[j];
        
        double x = (bi * fi / ei - ci) / ( bi * di / ei - ai);
        double y = (ci - ai * x) / bi;
        if(x == -0) x = 0;
        if(y == -0) y = 0;
        cout << x << " " << y << endl;
    }
    return 0;
}

C++: #include <cstdio>
#include <stdlib.h>
#include <math.h>

float a,b,c,d,e,f;
double    round( double val, int precision )
{
    double    ret;
    char    buf[256] = {'\0'};
    char    *p;

    sprintf( buf, "%.*f", precision, val );
    ret = strtod( buf, &p );

    return ret;
}
int main (){
  scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f);
  double x,y;
  x=(f*b/e-c)/(d*b/e-a);
  y=(f*a/d-c)/(e*a/d-b);
 round(x,4);
 round(y,4);
modf(x*1000, &x);
modf(y*1000, &y);
  printf("%.3f %.3f",x/1000,y/1000);
}

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

int main(){
  for(double a1,b1,c1,d1,e1,f1,b2,c2,e2,f2,a3,c3,d3,f3,x,y;cin>>a1>>b1>>c1>>d1>>e1>>f1;){

    b2=b1*d1;
    c2=c1*d1;

    e2=a1*e1;
    f2=a1*f1;

    y=(c2-f2)/(b2-e2);
    if(y==-0.000){
      y=0.000;
    }

    a3=a1*e1;
    c3=c1*e1;

    d3=b1*d1;
    f3=b1*f1;

    x=(c3-f3)/(a3-d3);
    if(x==-0.000){
      x=0.000;
    }

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