Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func read() string {
	sc.Scan()
	return sc.Text()
}

func main() {
	sc.Split(bufio.ScanLines)
	for sc.Scan() {
		s := strings.Split(sc.Text(), " ")
		a, _ := strconv.ParseFloat(s[0], 64)
		b, _ := strconv.ParseFloat(s[1], 64)
		c, _ := strconv.ParseFloat(s[2], 64)
		d, _ := strconv.ParseFloat(s[3], 64)
		e, _ := strconv.ParseFloat(s[4], 64)
		f, _ := strconv.ParseFloat(s[5], 64)
		x := ((b * f) - (c * e)) / ((b * d) - (a * e))
		y := ((a * f) - (c * d)) / ((a * e) - (b * d))
		if x == 0 {
			fmt.Printf("0.000 %.3f\n", y)
		} else if y == 0 {
			fmt.Printf("%.3f 0.000\n", x)
		} else {
			fmt.Printf("%.3f %.3f\n", x, y)
		}
	}
}

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;
}