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 <vector>
using namespace std;

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    // ????????§ ax+by=c, dx+ey=f ????§£?????????????????¨???????????¨???????¨????????????????(1)
    vector<vector<double>> answers;
    double a, b, c, d, e, f;
    int dump;
    while(cin >> a >> b >> c >> d >> e >> f) {
        double det = (double)(a*e-b*d);
        double ansx = (e*c+(-b)*f)/det;
        double ansy = ((-d)*c+a*f)/det;
        if(ansx == 0) ansx = 0.0;
        if(ansy == 0) ansy = 0.0;
        answers.push_back({ansx,ansy});
    }
    for(auto elm : answers) {
        cout << fixed << setprecision(3) << elm[0] << " " << elm[1] << endl;
    }

    return 0;
}

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

int main() {
    int a, b, c, d, e, f, g;
    while (cin >> a >> b >> c >> d >> e >> f) {
        g = b*d - a*e;
        if(g == 0) {
            continue;
        }
        printf ("%.3f %.3f", (double)-(c*e - f*b)/g, (double)(c*d - f*a)/g);
    }
    return 0;
}

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

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

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

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

C++: #include <iostream>
using namespace std;
int main(void){
    double A[2][3];
    while(cin >> A[0][0] >> A[0][1] >> A[0][2] >> A[1][0] >> A[1][1] >> A[1][2]){
        for(int i = 1; i < 3; i++){
            A[0][i] /= A[0][0];
        }
        A[0][0] /= A[0][0];
        for(int i = 1; i < 3; i++){
            A[1][i] -= A[0][i] * A[1][0];
        }
        A[1][0] -= A[0][0] * A[1][0];
        for(int i = 0; i < 3; i++){
            if(i != 1)
                A[1][i] /= A[1][1];
        }
        A[1][1] /= A[1][1];
        for(int i = 0; i < 3; i++){
            if(i != 1)
                A[0][i] -= A[1][i] * A[0][1];
        }
        A[0][1] -= A[1][1] * A[0][1];
        
        cout << A[0][2] << " " << A[1][2] << endl;
    }
}

C++: #include <iostream>

using namespace std;

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

	while(cin >> a >> b >> c >> d >> e >> f)
		printf("%.3lf %.3lf\n",(e*c-b*f)/(a*e-b*d)+0,(-d*c+a*f)/(a*e-b*d)+0);

	return 0;
}

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

int main(){
	double a, b, c, d, e, f;
	while(cin >> a >> b >> c >> d >> e >> f){
		double x = (double)((e*c-b*f) / (a*e-b*d));
		double 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 <iostream>
#include <algorithm>
#include <iomanip>
#include <cmath>
 
using namespace std;
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*d-a*f)/(b*d-a*e);
        x = round(1000*x) / 1000;
        y = round(1000*y) / 1000;
        if(x==0)x=0;
        if(y==0)y=0;
        cout << fixed << setprecision(3) << x << " " << y << endl;
    }
    return 0;
}

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

int main(void){

	while (true){
		int a, b, c, d, e, f;
		cin>>a>>b>>c>>d>>e>>f;
		if (cin.eof()) break;

		float x, y, tmp;
		tmp = (a*e-b*d);
		if (tmp>0){
			x = (c*e-b*f)/tmp;
			y = -(c*d-a*f)/tmp;
		}
		else{
			x = (-c*e+b*f)/(-tmp);
			y = (c*d-a*f)/(-tmp);
		}

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

C++: #include<iostream>
#include<stdio.h>
using namespace std;
int main(){
 double a,b,c,d,e,f,y,x;
 int i=0,n;
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*e)-(b*f))/((a*e)-(b*d));
  if(x == 0){x = 0;}
  if(y == 0){y = 0;}
  printf("%.3lf %.3lf\n", x,y);
  }
  i++;
}
  return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
	double a,b,c,d,e,f,x,y;
	int xx,yy;
	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);
		printf("%d.",(int)x);
		printf("%d",(int)(x*10)-(int)x*10);
		printf("%d",(int)(x*100)-(int)x*100);
		printf("%d",(int)(x*1000)-(int)x*1000);
		printf(" ");
		printf("%d.",(int)y);
		printf("%d",(int)(y*10)-(int)y*10);
		printf("%d",(int)(y*100)-(int)y*100);
		printf("%d",(int)(y*1000)-(int)y*1000);
		printf("\n");
	}
	return 0;
}

C++: #include <iomanip>
#include <utility>
#include <vector>
#include <math.h>
#include <algorithm>
#include <string>
#include <iostream>
using namespace std;



int main()
{
	double a[3], b[3];
	while (cin >> a[0] >> a[1] >> a[2] >> b[0] >> b[1] >> b[2])
	{
		if (a[0] == 0)
		{
			double c = a[2] / a[1];
			double d = (b[2] - b[1] * c) / b[1];
			a[2] = d;
			b[2] = d;
		}
		else
		{
			double c = 1;
			if (b[0] != 0)
			{
				c = a[0] / b[0];
				b[1] = b[1] * c - a[1];
				b[2] = b[2] * c - a[2];
			}
			b[2] /= b[1];
			b[1] = 1;
			a[2] -= b[2] * a[1];
			a[2] /= a[0];
		}
		if (a[2] < 0.0001 && a[2] > -0.0001)
			a[2] = 0.000;
		if (b[2] < 0.0001 && b[2] > -0.0001)
			b[2] = 0.000;

		cout << fixed << setprecision(3) << a[2] << b[2] << endl;
	}

	return 0;
}

C++: #include<queue>
#include<stack>
#include<cstdio>
using namespace std;
double a,b,c,d,e,f,x,y;
int main(){
	while(cin>>a>>b>>c>>d>>e>>f){
		x=(c*e-f*b)/(a*e-d*b);
		y=(c-a*x)/b;
		printf("%.3f %.3f\n",x+(1e-10),y+(1e-10));
	}
	return 0;
	
}

C++: #include<stdio.h>
int main() {
	double a, b, c, d, e, f;
	double x, y, z;
	int i;
	for (i = 0; i < 2; i++) {
		scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f);
		z = d / a;
		b *= z;
		c *= z;
		y = (c - f) / (b - e);
		x = (f - e*y) / d;
		printf("%.3f %.3f\n", x, y);
	}
	return 0;
}

C++: #include <stdio.h>

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

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

C++: #include <cmath>
#include <cstdio>
#include <cfloat>

namespace
{
	struct equation
	{
		double a, b, c;
	};
	auto calculate_x = [](equation e1, equation e2)
	{
		return (e1.c * e2.b - e1.b * e2.c) / (e1.a * e2.b - e1.b * e2.a);
	};
	auto calculate_y = [](equation e1, equation e2)
	{
		return (e1.c * e2.a - e1.a * e2.c) / (e1.b * e2.a - e1.a * e2.b);
	};
	auto round_off = [](double d, unsigned int digit)
	{
		d *= std::pow(10, digit - 1);
		d = std::round(d);
		d /= std::pow(10, digit - 1);
		return d;
	};
}

namespace
{
	equation e1, e2;
}

int main()
{
	while (std::scanf("%lf", &e1.a) != EOF)
	{
		std::scanf("%lf%lf%lf%lf%lf", &e1.b, &e1.c, &e2.a, &e2.b, &e2.c);
		double x = round_off(calculate_x(e1, e2), 4);
		double y = round_off(calculate_y(e1, e2), 4);
		std::printf("%.3f %.3f\n", x + DBL_EPSILON, y + DBL_EPSILON);
	}
	return 0;
}