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<stdio.h>
#include<iomanip>
using namespace std;
int main()
{
    double a,b,c,d,e,f,x,y;
    while(cin>>a>>b>>c>>d>>e>>f)
    {

    cout<<setprecision(3)<<fixed;
    x=((-b*f)+(c*e))/(a*e-b*d);
    y=(-c*d+a*f)/(a*e-b*d);
    if(x==0)x=0;
    if(y==0)y=0;
    cout<<x<<" "<<y<<endl;
    }



    return 0;
}

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

using namespace std;

int main(){

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

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

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

cout << setprecision(4) << x << " " << y;
}
}

C++: #include <cstdio>
#include <string>
#include <vector>
#include <algorithm>
#include <memory.h>
#include <cmath>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <ctime>
#include <iostream>
#include <functional>
#include <complex>
#include <iomanip>
#pragma comment(linker, "/STACK:836777216")

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<double, double> pdd;
typedef pair<pii, int> p3i;
typedef vector<int> vi;
typedef vector<pii> vii;
typedef vector<pll> vll;
typedef vector<p3i> v3i;
typedef vector<vii> vvii;
typedef vector<p3i> vp3i;
typedef long double ld;
typedef vector<ld> vld;

#define pb push_back
#define mp make_pair
#define REP(i, n) for (int (i) = 0; (i) < (n); (i)++)
#define REPD(i, n) for (int (i) = (n) - 1; (i) >= 0; (i)--)
#define FOR(i, a, b) for (int (i) = (a); (i) < (b); (i)++)
#define FORD(i,a, b) for (int (i) = (a); (i) >= (b); (i)--)
#define sz(v) (int)(v).size()
#define all(v) (v).begin(), (v).end()
#define rv(v) reverse(all(v))
#define CL(v, val) memset((v), (val), sizeof((v)))
#define SORT(a) sort(all(a))
#define un(v) SORT(v), (v).resize(unique(all(v)) - (v).begin())
#define eps 1.0e-7
#define X first
#define Y second
#define bit(n) (1 << (n))
#define bit64(n) (ll(1) << (n))
#define sqr(n) ((n) * (n))

ll DET(ll a, ll b, ll c, ll d) {
  return a * d - b * c;
}

int main(void) {
  ll a,b,c,d,e,f;
  while (scanf("%lld%lld%lld%lld%lld%lld", &a, &b, &c, &d, &e, &f) == 6) {
    ll det = DET(a,b,d,e);
    ll det1 = DET(c,b,f,e);
    ll det2 = DET(a,c,d,f);
    double x = 1.0 * det1 / det;
    double y = 1.0 * det2 / det;
    printf("%.4lf %.4lf\n", x + eps, y + eps);
  }
  return 0;
}

C++: #include <cstdio>

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

C++: #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define MOD 1000000007 //10^9+7
#define INF 1000000000 //10^9

double round3(double x);
pair<double, double>equ2(int a,int b,int c,int d,int e,int f);

pair<double, double>equ2(int a,int b,int c,int d,int e,int f){
    double det=1.0/(a*e-b*d);
    double x=(double)(c*e-b*f)*det;
    double y=(double)(a*f-c*d)*det;
    if (x==-0) x=0;if (y==-0) y=0;
    return pair<double, double>(round3(x),round3(y));
}

double round3(double x){
    if(x>=0) return floor((x+0.0005)*1000)/1000.0;
    return -1*floor((-1*x+0.0005)*1000)/1000.0;
}

int main ()
{
    string str;
    while (!cin.eof()) {
        int a,b,c,d,e,f;
        
        cin>>a>>b>>c>>d>>e>>f;
        
        pair<double,double> ans=equ2(a,b,c,d,e,f);
        
        printf("%.3f %.3f\n",ans.first,ans.second);
    }
    return 0;
}

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

using namespace std;

int main()
{
	double x, y, det;
	vector<double> a(3);
	vector<double> b(3);
	while(1)
	{
		for (int i = 0; i < 3; i++)
		{
			cin >> a[i];
		}
		for (int i = 0; i < 3; i++)
		{
			cin >> b[i];
		}
		if (cin.eof())
		{
			break;
		}
		det = a[0] * b[1] - a[1] * b[0];
		x = (b[1] * a[2] - b[2] * a[1]) / det + 0;
		y = (-a[2] * b[0] + a[0] * b[2]) / det + 0;
		cout << fixed << setprecision(3) << x << " " << y << endl;
	}
}

C++: #include <stdio.h>

double sishagonyu(double num)	{
	
	int num2;
	
	if (num == 0) return num;
	if (num > 0) { 
		num += 0.0005;
	} else {
		num -= 0.0005;
	}
	/*
	num *= 1000;
	num2 = (int)num;
	num = num2;
	num /= 1000;
	*/
	return num;
}

int main() {
	
	double a, b, c, d, e, f;	//scanf
	double x, y;							//ans
	
	double n = 0, m = 0, j = 0, h = 0, i = 0;						//temp
	
	while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF){
		
		//if (scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) == EOF) break;
		
		//printf("%lf %lf %lf\n%lf %lf %lf\n", a, b, c, d, e, f);	//input
		
		n = a / d;
		
		j = d * n;
		h = e * n;
		i = f * n;
		
		//printf("%lf %lf %lf\n%lf %lf %lf\t\t%lf\n", a, b, c, j, h, i, n);
		
		m = b - h;
		y = c - i;
		//printf("%lf %lf\n", m, y);
		
		if(y != 0) y /= m;
		//printf("%lf\n", y);
		
		i = c - (b * y);
		x = i / a;
		
		//printf("x = %lf, y = %lf\n", x, y);
		
		x = sishagonyu(x);
		y = sishagonyu(y);
		
		//printf("%lf %lf\n", x, y);
		printf("%.3lf %.3lf\n", x, y);
			}
	return 0;
}

//1 2 3 4 5 6
//-1.000 2.000

//2 -1 -2 -1 -1 -5
//1.000 4.000

//2 -1 -3 1 -1 -3
//0.000 3.000

// 2 -1 -3 -9 9 27
// 0.000 3.000

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

int main(){
  double a,b,c,d,e,f,x,y;
  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(x == -0) x = 0;
	if(y == -0) y = 0;
	cout << fixed << setprecision(3) << x << " " << y << endl;
  } 
  return 0;
}

C++: #include<iostream>
#include<string>
#include<stdio.h>
#include<cctype>
#include<algorithm>
#include<climits>
#include<cmath>
#include<map>
#include<vector>
#define INF INT_MAX
using namespace std;

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

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

	return 0;
}