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 <stdio.h>
using namespace std;

int main(){

    double a, b, c, d, e, f;
    while (cin >> a >> b >> c >> d >> e >> f){
        double x = (e*c - b*f) / (e*a - d*b);
        double y = (a*f - d*c) / (e*a - d*b);
        printf("%.3f %.3f\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 de = (a*e) - (b*d);
        double x = 0;
        double y = 0;
        x = e*c + (-b)*f;
        x /= de;
        y = a*f + (-d)*c;
        y /= de;
        if(x == 0)
            x = 0.000;
        if(y == 0)
            y = 0.000;

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

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

int main()
{
	int a, b, c, d, e, f;
	double x, y;
	while (cin >> a >> b >> c >> d >> e >> f)
	{
		b *= d; c *= d;
		e *= a; f *= a;
		b -= e; c -= f;
		y = c*1.0 / b;
		x = (f - e*y)*1.0 / (d*a);
		if (x < 0.0001 && x > -0.0001) x = 0.000;
		if (y < 0.0001 && y > -0.0001) y = 0.000;
		cout << fixed << setprecision(3) << x << " " << fixed << setprecision(3) << y << endl;
	}
	
	return 0;
}

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

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

C++: #include <stdio.h>

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

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

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

}

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

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

	while (cin >> a >> b >> c >> d >> e >> f){
		double x, y;
		x = (c * e - b * f) / (a * e - b * d);
		y = (c - (a * x)) / b;

		printf("%.3f %.3f\n", x, y);
	}

	return (0);
}

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

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

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

int main(){
	double a, b, c, d, e, f;
	double x, y;
	double A, B, C;
	const double p = 0.00000001;

	while (cin >> a >> b >> c >> d >> e >> f){
		A = (a*e) - (b*d);
		B = (c*e) - (b*f);
		C = (a*f) - (c*d);

		x = B / A;
		y = C / A;
		
		if (abs(x) < p) x = 0;
		if (abs(y) < p) y = 0;

		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;
    double x,y;
    
    while(cin >> a >> b >> c >> d >> e >> f){
         
         double tmp1,tmp2;
        tmp1= (c*e - b*f)/ (a*e - b*d);
        tmp2 = (c*d - a*f)/(b*d - a*e);
        x = tmp1;
        y = tmp2;
            if(x == 0)x = 0;
            if(y == 0)y = 0;
         printf("%.3f %.3f",x,y);
        
    }
    return 0;
}

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

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

int main()
{
	solve();
	return(0);
}

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

using namespace std;

int main() {
	int i=0;
	int a[10000], b[10000], c[10000], d[10000], e[10000], f[10000];
	while (1) {
		cin >> a[i] >> b[i] >> c[i] >> d[i] >> e[i] >> f[i];
		if (a[i] == 0 && b[i] == 0 && c[i] == 0 && d[i] == 0 && e[i] == 0 && f[i] == 0)break;
		i++;
	}
	double x[10000], y[10000];
	for (int j = 0; j < i; j++) {
		y[j] = (double)(c[j] * d[j] - a[j] * f[j]) / (double)(b[j] * d[j] - a[j] * e[j]);
		x[j] = (double)(c[j] * e[j] - b[j] * f[j]) / (double)(a[j] * e[j] - b[j] * d[j]);
		printf("%.3lf %.3lf \n", x[j], y[j]);
	}
	return 0;
}

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

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

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) {
    x = (c * e - b * f) / (a * e - b * d);
    y = (c - a * x) / b;
    cout << fixed << setprecision(3) << x + 0 << " " << y + 0 << endl;
  }
  return 0;
}

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

C++: #include <stdio.h>
#include <iostream>
#include <algorithm>
#include <cmath>

using namespace std;

int main() {

int a, b, c, d, e, f;

	while(cin >> a >> b >> c >> d >> e >> f) {
	
	 double y = (double)(a*f - c*d)/(a*e - b*d);
	 double x = (double)(c - b*y)/a;

	printf("%.3f %.3f\n", x, y);
	}

    return 0;
}

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

using namespace std;

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

C++: #include <stdio.h>
#include<string>
#include<string.h>
#include <math.h>
#include<iostream>
#include <algorithm>
#include <map>
#include <vector>
#include <queue>
using namespace  std;


/*
//my header
#include "define.h"
#include "geometry.h"*/

#define MyAbs(a) ((a)>0?(a):-(a))
#define MyEqualDoule(a,b) (MyAbs(a-b)<1e-6)

void init()
{
#ifdef _WIN32
	freopen("1.txt", "r", stdin);
#endif
}

void func();

int main()
{
	init();
	func();

	return 0;
}


void func()
{
	int a,b,c,d,e,f;
	float x, y;
	while(~scanf("%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f))
	{
			x = (c*e-f*b)*1.0/(a*e - b*d);
			y = (c*d-a*f)*1.0/(b*d - a*e);
			float x2 = (c-b*y)*1.0/a;
			if(x-x2 == 0)
				while(1);
		printf("%.3f %.3f\n", x2, y);
	}
}