Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	for scanner.Scan() {
		strNums := strings.Fields(scanner.Text())
		nums := []int{}
		for _, strNum := range strNums {
			num, _ := strconv.Atoi(strNum)
			nums = append(nums, num)
		}
		a := nums[0]
		b := nums[1]
		c := nums[2]
		d := nums[3]
		e := nums[4]
		f := nums[5]
		var mulA, mulD int
		if a < 0 {
			mulA = a * -1
		} else {
			mulA = a
		}
		if d < 0 {
			mulD = d * -1
		} else {
			mulD = d
		}
		a *= mulD
		b *= mulD
		c *= mulD
		d *= mulA
		e *= mulA
		f *= mulA

		if d < 0 {
			d *= -1
			e *= -1
			f *= -1
		}

		bE := b - e
		cF := c - f
		if bE == 0 {
			bE = 1
		}
		y := cF / bE
		x := (c - (y * b)) / a

		fmt.Print(x)
		fmt.Print(".000 ")
		fmt.Print(y)
		fmt.Println(".000")
	}
}

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

constexpr double eps = 1e-8;

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

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

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

using namespace std;

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

int main(){
	while(cin >> a >> b >> c >> d >> e >> f){
		printf("%0.3lf ",(c/a)-((b*c*d-a*b*f)/(a*b*d-a*a*e)));

		printf("%0.3lf\n",(c*d-a*f)/(b*d-a*e));
	}
    return 0;
}

C++: #include <iostream>
#include <stdio.h>
using namespace std;
int main()
{
    int i,j,in[2][3]={0};
    double delt=0,x=0,y=0;
    for(;;)
    {
        for(i=0;i<2;i++)
        {
            for(j=0;j<3;j++)
                cin >> in[i][j];
        }
        if(in[0][0]==EOF)
            break;
        delt=in[0][0]*in[1][1]-in[0][1]*in[1][0];
        i=in[0][0];
        in[0][0]=in[1][1];
        in[1][1]=i;
        in[0][1]*=-1;
        in[1][0]*=-1;
        x=(double)(in[0][0]*in[0][2]+in[0][1]*in[1][2])/delt;
        y=(double)(in[1][0]*in[0][2]+in[1][1]*in[1][2])/delt;
        if(x>0)
            x+=0.0005;
        else
            x-=0.0005;
        if(y>0)
            y+=0.0005;
        else
            y-=0.0005;
        printf("%0.3lf %0.3lf",x,y);//cout<<x<<"\n"<<y<<endl;
    }
    return 0;
}

C++: #include <cstdio>

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) {
              y = (( c*d ) - ( a*f )) / ((b*d) - (a*e));
              x = (c - b*y) / a;
              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 n;
 double x,y,ty,tc;
	while( cin>>a>>b>>c>>d>>e>>f )
	{
 	n=(a/d);
 	d = d * n;
 	e = e * n;
 	f = f * n;

	ty = b-e; 	
 	tc = c-f;
 	y = tc/ty;

 	tc = c - (b*y);
 	x = tc/a;
 	
 printf("%0.3lf %0.3lf\n",x,y);
 	
	}
 return 0;
}

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

/*
??£???????¨????
	ax + by = c
	dx + ey = f
????§£x, y???????????????????????°??????
*/
int main() {
	double a, b, c, d, e, f;
	int cnt = 0;						//??\??????????????£???????¨????????????°
	std::vector<double> x_vector;		//x????§£???????´?
	std::vector<double> y_vector;		//y????§£???????´?

#if 0
	while (cnt < 1) {
		cin >> a >> b >> c >> d >> e >> f;
#else
	while (cin >> a >> b >> c >> d >> e >> f) {
#endif
		if (
			(a < -1000) || (1000 < a) ||
			(b < -1000) || (1000 < b) ||
			(c < -1000) || (1000 < c) ||
			(d < -1000) || (1000 < d) ||
			(e < -1000) || (1000 < e) ||
			(a < -1000) || (1000 < f)
			) {
			break;
		}
		double x = (b * f - c * e) / (b * d - a * e);
		double y = (c * d - a * f) / (b * d - a * e);

		cnt++;
		x_vector.push_back(x);
		y_vector.push_back(y);
	}

	for (unsigned int i = 0; i < cnt; i++) {
		std::cout << std::fixed << std::setprecision(3) << x_vector[i] + 0 << " ";
		std::cout << std::fixed << std::setprecision(3) << y_vector[i] + 0 << endl;
	}

	cnt = 0;
	x_vector.clear();
	y_vector.clear();

	//???????????°
	//while (1);

	return 0;
}

C++: #include<iostream>
#include<algorithm>
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<bits/stdc++.h>
using namespace std;
typedef long long ll;

int main(){
  double a, b, c, d, e, f;
  while(cin >> a >> b >> c >> d >> e >> f){
    double bb = b * d, cc = c * d;
    double ee = e * a, ff = f * a;
    double y = (cc - ff) / (bb - ee);
    double x = (c - b * y) / a;

    printf("%0.3f %0.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 const denominator = a * e - b * d;
		double const numerator1 = c * e - b * f;
		double const numerator2 = a * f - c * d;
		std::cout.setf(std::ios::fixed);
		std::cout.precision(3);
		std::cout << std::showpoint
				  << (numerator1 ? numerator1 / denominator : 0.0) << ' '
				  << (numerator2 ? numerator2 / denominator : 0.0) << std::endl;
	}
	return 0;
}

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

int main(){
double a,b,c,d,e,f,a_,b_,c_,d_,e_,f_;
double x,y;
double in;
while (std::cin >>a>>b>>c>>d>>e>>f){
in = (a*e - b*d);
a_ = e/in;
b_ = -1*b/in;
d = -1*d/in;
e_ = a/in;
x = c * a_ + f*b_;
y = c*d_ + f*e_;
std::cout << std::setprecision(3) << std::fixed << x << ' ' << std::setprecision(3) << std::fixed <<  y << std::endl;
}
    return 0;
}

C++: #include <iostream>

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

using namespace std;

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

    while (cin >> a >> b >> c >> d >> e >> f) {
        int det = a * e - b * d;
        double x = (e * c - b * f) / det;
        double y = (a * f - d * c) / det;
        printf("%.3f %.3f", x + 0.0, y + 0.0);
    }
}

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

void OutputSolution(int a, int b, int c, int d, int e, int f)
{
	double y = (a*f - c*d) / (a*e - b*d);
	double x = (c-b*y) / a;
	if(x == -0) x = 0;
	if(y == -0) y = 0;
	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;
}