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 <cstdio>
int main (int argc, char *argv[]) {
    using namespace std;
    int a, b, c, d, e, f;
    while (EOF != fscanf(stdin, "%d %d %d %d %d %d\n", &a, &b, &c, &d, &e, &f)) {
        float tmp1 = static_cast<float>(f)-(static_cast<float>(c)*static_cast<float>(d)/static_cast<float>(a));
        float tmp2 = static_cast<float>(e)-(static_cast<float>(b)*static_cast<float>(d)/static_cast<float>(a));
        float y = tmp1/tmp2;
        float x = (static_cast<float>(c) - static_cast<float>(b) * y) / static_cast<float>(a);
        printf("%.3f %.3f\n", x, y);        
        //printf("y=%f\n", (f-(c*d/a))/(e-(b*d/a)));
    }
    return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main()
{
    double a,b,c,d,e,f,x,y,z;

    while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)!=EOF)
          {
              z=(a*e)-(b*d);
                x=((c*e)-(b*f))/z;
                y=((a*f)-(d*c))/z;

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

C++: #include<iostream>
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) )
	
	{
		double y=(double)(c*d-a*f)/(double)(b*d-a*e);
		if(a!=0)
		
		printf("%.3f %.3f\n",(c-b*y)/a,y);
		else
		printf("%.3f %.3f\n",(f-e*y)/d,y);
	}

    return 0;
    
    }

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

void solve_SE(double* x, double a, double b, double c, double d, double e, double f)
{
    x[0] = (c * e - f * b) / (a * e - d * b);
    x[1] = (c * d - f * a) / (b * d - e * a);
}

int main()
{
    double a, b, c, d, e, f;
    double x[2];
    while (cin >> a >> b >> c >> d >> e >> f) {
        solve_SE(&x[0], a, b, c, d, e, f);
        for (int i = 0; i < 2; i++) {
            x[i] *= 1000;
            if (x[i] > 0)
                x[i] += 0.5;
            else 
                x[i] -= 0.5;
            x[i] = static_cast<int>(x[i]) / 1000;
        }
        cout << fixed << setprecision(3) << x[0] << ' ' << x[1] << endl;
    }
}

C++: ///BISMILLAHIR RAHMANIR RAHMIM
#include <bits/stdc++.h>
using namespace std;

int main ()
{
    ///freopen("input.txt","r",stdin);
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    double a,b,c,d,e,f,x,y;
    while (scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f) !=EOF)
{
        x=(c*e-b*f)/(a*e-b*d);
        y=(a*f-c*d)/(a*e-b*d);
        if (x==0.000 && y!=0.000)
            printf("0.000 %.3lf\n",y);
        else if(x!=0.000 && y==0.000)
            printf("%.3lf %0.000\n",x);
        else
            printf("%.3lf %.3lf\n",x,y);
    return 0;
}
}

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

int main() {

//変数の宣言

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

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

C++: const int tt = 10000;

#include<iostream>
#include<string>
#include<sstream>
using namespace std;

string toStr(int n);
string intToString(int n);

int main() {
  int a, b, c, d, e, f;
  
  while(cin >> a >> b >> c >> d >> e >> f) {
    c = c * tt;
    f = f * tt;

    int det = a * e - b * d;

    int x = ( e * c - b * f) / det;
    int y = (-d * c + a * f) / det;
//    cout << x << y << endl;

    cout << toStr(x) << " " << toStr(y) << endl;
  }
}

string toStr(int n) {
  string pm, val;
  
  if (n < 0) {
    pm = "-";
    n = -n;
  } else {
    pm = "";
  }

  int ipart = n / tt;
  int fpart = (n - ipart * tt) + tt + 5;

  val = pm + intToString(ipart) + "." + intToString(fpart).substr(1, 3);
  return val;
}

string intToString(int n) {
  stringstream ss;
  ss << n;
  return ss.str();
}

C++: #include<iostream>
#include<stdio.h>
#include<math.h>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
    int a,b,c,d,e,f;
    while(cin>>a>>b>>c>>d>>e>>f){
        double x,y;
        x=(c-b*(a*f-c*d)/(a*e-b*d))/a;
        y=(a*f-c*d)/(a*e-b*d);
        printf("%.3f %.3f\n",x,y);
    }
}

C++: #include <iostream>			//std::cout, std::cin
#include <string>			//std::string,std::to_string(C++11)
#include <vector>			//std::vector
#include <valarray>			//std::valarray
#include <algorithm>		//std::sort
#include <ctime>			//localtime_s
#include <cstdlib>			//abs
#include <cmath>			//abs,std::pow,sqrt,sin,cos,round,floor,ceil
#include <fstream>			//std::ifstream,std::ofstream
#include <iomanip>			//std::setprecision,std::setw,std::setfill
#include <random>			//std::random(C++11)
#include <numeric>			//std::accumulate
#include <functional>		//std::greater
#include <chrono>			//std::chrono(C++11)
#include <bitset>			//std::bitset
#include <queue>			//std::queue

const static double	de_PI	= 3.14159265358979323846;
const static int	de_MOD	= 1000000007;
const static int	de_MAX	= 999999999;

double RoundOff(double a, const int n) {

	for (int i = 0; i < n - 1; i++) {	a *= 10;	}

	if (a > 0) {	a += 0.5;	}
	else {			a -= 0.5;	}

	a = static_cast<int>(a);

	for (int i = 0; i < n - 1; i++) {	a /= 10;	}

	return a;
}

int main(void) {

	//std::ifstream in("123.txt");	std::cin.rdbuf(in.rdbuf());
	//std::ofstream ofs("456.csv");
	//std::chrono::system_clock::time_point t_st = std::chrono::system_clock::now();

	double a = 0, b = 0, c = 0, d = 0, e = 0, f = 0;
	std::vector<double> X, Y;

	while (std::cin >> a) {
		std::cin >> b >> c >> d >> e >> f;
		X.push_back(RoundOff((b*f - c*e) / (b*d - a*e), 4));
		Y.push_back(RoundOff((a*f - c*d) / (a*e - b*d), 4));
	}

	for (unsigned int i = 0; i < X.size(); i++) {
		std::cout << std::fixed << std::setprecision(3) << X[i] << " " << Y[i] << std::endl;
	}

	//std::chrono::system_clock::time_point t_ed = std::chrono::system_clock::now();
	//std::cout << std::chrono::duration_cast<std::chrono::milliseconds>(t_ed - t_st).count() << "ms" << std::endl;

}