Go: package main

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

var sc = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)

func main() {
	sc.Split(bufio.ScanWords)
	defer out.Flush()
	for {
		data := nextInts(6)
		fmt.Printf("%.3f\n", Round(GetX(data[0], data[1], data[2], data[3], data[4], data[5]), 3))
		fmt.Printf("%.3f\n", Round(GetY(data[0], data[1], data[2], data[3], data[4], data[5]), 3))
	}
}

func GetX(a, b, c, d, e, f float64) float64 {
	return float64(((c * e) - (b * f)) / ((a * e) - (b * d)))
}

func GetY(a, b, c, d, e, f float64) float64 {
	return float64(((c * d) - (a * f)) / ((b * d) - (a * e)))
}

func Round(f float64, places int) float64 {
	shift := math.Pow(10, float64(places))
	return math.Floor(f*shift+.5) / shift
}

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

func nextInt() float64 {
	a, _ := strconv.Atoi(next())
	return float64(a)
}

func nextInts(n int) []float64 {
	a := make([]float64, n)
	for i := 0; i < n; i++ {
		a[i] = nextInt()
	}
	return a
}

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 y = (c * d - f * a) / (b * d - a * e);
        double x = (f - e * y) / d;

        if (x == -0) x = 0;
        if (y == -0) y = 0;
        printf("%.3f %.3f\n", x, y);
    }
}

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

using namespace std;

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

    while (cin >> a >> b >> c >> d >> e >> f) {
        answer1 = static_cast<double>(e * c - b * f) / (a * e - b * d);
        answer2 = static_cast<double>(-d * c + a * f) / (a * e - b * d);
        if (answer1 == 0) answer1 = 0.000;
        if (answer2 == 0) answer2 = 0.000;
        cout << fixed << setprecision(3) << round(answer1) << " " << round(answer2) << endl;
    }
    
    return 0;
}

C++: #include <iostream>
#include <cstdio>
#ifndef repeat
#define repeat(i,n) for (int i = 0; i < (n); ++i)
#endif
#ifndef repeat_from
#define repeat_from(i,m,n) for (int i = (m); i < (n); ++i)
#endif
#ifndef repeat_one
#define repeat_one(i,n) for (int i = 1; i <= (n); ++i)
#endif
#ifndef repeat_rev
#define repeat_rev(i,n) for (int i = (n)-1; 0 <= i; --i)
#endif
#ifndef foreach
#define foreach(it, cont) for (typeof(cont.begin()) it = cont.begin(); it != cont.end(); ++it)
#endif
#include <vector>
#include <cmath>
#ifndef repeat
#define repeat(i,n) for (int i = 0; i < (n); ++i)
#endif
#ifndef repeat_from
#define repeat_from(i,m,n) for (int i = (m); i < (n); ++i)
#endif
#ifndef repeat_one
#define repeat_one(i,n) for (int i = 1; i <= (n); ++i)
#endif
#ifndef repeat_rev
#define repeat_rev(i,n) for (int i = (n)-1; 0 <= i; --i)
#endif
#ifndef foreach
#define foreach(it, cont) for (typeof(cont.begin()) it = cont.begin(); it != cont.end(); ++it)
#endif
#ifndef LIB_DEBUG_HPP
#define LIB_DEBUG_HPP
#ifdef DEBUG
#include <cassert>
#define debug(a) a
#else
#define debug(a)
#endif
#endif
#include <iostream>

// a11x1 + a12x2 + ... + a1m-1xm-1 = a1m
// a21x1 + a22x2 + ... + a2m-1xm-1 = a2m
//      ...        ...            ...
// an1x1 + an2x2 + ... + anm-1xm-1 = anm
std::vector<double> gaussian_elim(std::vector<std::vector<double> > a) {
    const int n = a.size();
#ifdef DEBUG
    assert (0 < n);
#endif
    const int m = a[0].size();
#ifdef DEBUG
    repeat (i, n) assert ((int)a[i].size() == m);
    assert (n == m-1);
#endif
    // make an upper diagonal matrix
    repeat (i, n) {
        {
            int pivot = -1;
            repeat_from (j, i, n) {
                const double eps = 1e-16;
                if (eps < std::abs(a[j][i])) { pivot = j; break; }
            }
#ifdef debug
            assert (pivot != -1);
#endif
            if (pivot != i) std::swap(a[i], a[pivot]);
        }
        repeat_from (j, i+1, m) a[i][j] /= a[i][i];
        a[i][i] = 1;
        repeat_from (j, i+1, n) {
            repeat_from (k, i+1, m) {
                a[j][k] -= a[j][i] * a[i][k];
            }
            a[j][i] = 0;
        }
    }
    // gather the solutions
    std::vector<double> result(n);
    repeat_rev (i, n) {
        result[i] = a[i][m-1];
        repeat_from (j, i+1, n) {
            result[i] -= a[i][j] * result[j];
        }
    }
    return result;
}
using namespace std;
int main() {
    // ax + by = c
    // dx + ey = f
    vector<vector<double> > v(2, vector<double>(3));
    vector<double> w;
    while (true) {
        repeat (i,2) repeat (j,3) cin >> v[i][j];
        if (cin.fail()) break;
        w = gaussian_elim(v);
        printf("%.3lf %.3lf\n", w[0], w[1]);
    }
    return 0;
}

C++: #include <cstdio>

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

C++: #include <iostream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <algorithm>
#include <string>
#include <set>
#include <map>
#include <queue>
using namespace std;
typedef long long int ll;
const int INF = 100000000;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
int main(){
    for(double a1, a2, b1, b2, c1, c2;cin >> a1 >> b1 >> c1 >> a2 >> b2 >> c2;){
        double x, y;
        bool swp = false;
        b2 -= b1 * (a2 / a1);
        c2 -= c1 * (a2 / a1);
        y = c2 / b2;
        x = (c1 - y * b1) / a1;
        printf("%.3f %.3f\n", x, y);
    }
    return 0;   
}

C++: #include<iostream>
int main(){for(float a,b,c,d,e,f,x,y;;printf("%.3f %.3f\n",x,y)){if((std::cin>>a>>b>>c>>d>>e>>f).eof())break;y=(c*d-a*f)/(b*d-a*e);x=d?f/d-e*y/d:c/a-b*y/a;}}

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

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-d*b);
  y=(a*f-d*c)/(a*e-d*b);
  if(abs(x)<=(0.0+numeric_limits<double>::epsilon())) x = +0.00000000;
  if(abs(y)<=(0.0+numeric_limits<double>::epsilon())) y = +0.00000000;
  cout << fixed << setprecision(3) << x << " " << y << endl;
 }
 return 0;
}

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

int main()
{
	int a, b, c, d, e, f;
	cout << showpoint << setprecision(3);
	while (cin >> a >> b >> c >> d >> e >> f){
		double x = ((double)(b*f - c*e)) / (double)(b*d - a*e);
		double y = ((double)(c*d - a*f)) / (double)(b*d - a*e);
		cout << x << ' ' << y << "\n";
	}
	cout.flush();
}

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 <cstdio>
using namespace std;
int main(){
	double a,b,c,d,e,f;
	while(cin >> a >> b >> c >> d >> e >> f){
		double x = (c*e-f*b)/(a*e-d*b);
		double y = (c*d-f*a)/(b*d-a*e);
		printf("%.3lf %.3lf\n",x,y);
	}
}

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

using namespace std;

int main(){
  for(double a,b,c,d,e,f;cin>>a>>b>>c>>d>>e>>f;){
    double x=(c*e-f*b)/(a*e-d*b);
    cout<<fixed<<setprecision(3)<<x<<' '<<(f-d*x)/e<<endl;
  }
  return 0;
}