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<stdio.h>
#define N 1000000
struct{int a[6];}data[N];

int main(){
    int i,j,L;
    double a,b,c,d,e,f;
    double x,y;
    for(i=0; i<N; i++){
        for(j=0;j<6;j++)
            if(scanf("%d",&data[i].a[j])==EOF)break;
        if(j==0)break;
    }
    L=i;
    for(i=0;i<L;i++){       
        a=data[i].a[0]; b=data[i].a[1]; c=data[i].a[2]; d=data[i].a[3]; e=data[i].a[4]; f=data[i].a[5];
        x=(1/(a*e-b*d))*(e*c-b*f);
        y=(1/(a*e-b*d))*(a*f-d*c);
        printf("%4.3f %4.3f\n",x,y);
    }
    return 0;
}

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

int main(void)
{
	// ax+by=c,dx+ey=f => ax+by=c,-(a/d)*dx+-(a/d)*ey=-(a/d)*f => ax+by=c,-ax-aey/d=-af/d => by-aey/d=c-af/d => (b-ae/d)y = c-af/d => y=(c-af/d)/(b-ae/d)
	// ax+by=c, ax=c-by, x=(c-by)/a
	
	signed int a, b, c, d, e, f;
	double x, y;
	
	do
	{
		if(std::cin >> a, !std::cin) break;
		std::cin >> b >> c >> d >> e >> f;
		y = (c-a*f/d)/(b-a*e/d);
		x = (c-b*y)/(double)a;
		printf("%.3lf %.3lf\n", x, y);
	} while(true);

	return 0;
}

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

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

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

		if (0 == x) { x *= -1; }
		y = (c - a * x) / b;

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

C++: #include <stdio.h>

int main(void) {
  double a, b, c, d, e, f;
  while(scanf("%lf%lf%lf%lf%lf%lf", &a, &b, &c, &d, &e, &f) != EOF) {
    double ee = e / b, dd = d / a;
    double ax = a * ee, cx = c * ee;
    printf("%f ", (cx - f) / (ax - d) == -0 ? 0 : (cx - f) / (ax - d));
    b *= dd, c *= dd;
    printf("%f\n", (c - f) / (b - e) == -0 ? 0 : (c - f) / (b - e));
  }
  return 0;
}

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

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	double a, b, c;
	double 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);
		
		if(x == -0)
			x = 0;
		if(y == -0)
			y = 0;
		
		cout << fixed << setprecision(3) << x << " " << y << endl;
	}
	return 0;
}

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

int main() {
	double a, b, c, d, e, f, x, y;
	while (cin >> a >> b >> c >> d >> e >> f) {
		// (1) a x + b y = c  && (2) dx +  ey =  f
		// (3) adx + bdy = cd && (4) adx + aey = af
		// (3) - (4) (bd - ae) * y = cd - af
		// (5) y = (cd - af) / (bd - ae)
		// (1) x = (c - by) / a
		y = (c * d - a * f) / (b * d - a * e);
		x = (c - b * y) / a;
		// 1.234ab * 1000
		// 1234.ab + 0.5
		// (int)(1234.cd / 1000)
		// 1.234c
		x *= pow(10, 3);
		y *= pow(10, 3);
		if (x < 0) {
			x -= 0.5;
		}
		else if (x > 0) {
			x += 0.5;
		}
		else {
			x;
		}
		if (y < 0) {
			y -= 0.5;
		}
		else if (y > 0) {
			y += 0.5;
		}
		else {
			y;
		}
		x = (int)x;
		y = (int)y;
		x /= pow(10, 3);
		y /= pow(10, 3);
		cout << fixed << setprecision(3) << x << flush;
		cout << " " << flush;
		cout << fixed << setprecision(3) << y << flush;
		cout << endl;
	}
	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=(e*c-b*f)/(e*a-b*d);
        double y=(d*c-a*f)/(d*b-a*e);
    
        printf("%.3f %.3f\n",x+0.0,y+0.0);
    }
    
    return 0;
    
}

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

using namespace std;

int main() {

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

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

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

    return 0;
}

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

double round(double num);
/*
??£???????¨????
	ax + by = c
	dx + ey = f
????§£x, y???????????????????????°??????
*/
int main() {
	double a, b, c, d, e, f;
	int cnt = 0;						//??\??????????????£???????¨????????????°
	std::vector<double> x_vector;		//x????§£???????´?
	std::vector<double> y_vector;		//y????§£???????´?

#if 0
	while (cnt < 2) {
		cin >> a >> b >> c >> d >> e >> f;
#else
	while (cin >> a >> b >> c >> d >> e >> f) {
#endif
		double x = (b * f - c * e) / (b * d - a * e);
		double y = (c * d - a * f) / (b * d - a * e);

		cnt++;
		x_vector.push_back(x);
		y_vector.push_back(y);
	}

	for (unsigned int i = 0; i < cnt; i++) {
		double x_result = round(x_vector[i]);
		double y_result = round(y_vector[i]);

		std::cout << std::fixed;
		std::cout << std::setprecision(3) << x_result << " ";
		std::cout << std::setprecision(3) << y_result << endl;
	}

	//???????????°
	//while (1);

	return 0;
}

//?°???°????¬¬4???????????¨?????\????????¢??°
double round(double num) {
	int num_mul_10000 = num * 10000;
	int num_mul_1000  = num * 1000;
	if (5 <= (num_mul_10000 - num_mul_1000 * 10)) {
		return num + 0.001;
	}
	else {
		return num;
	}
}

C++: #include<bits/stdc++.h>
#include<cstdio>

using namespace std;

int main()
{

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

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

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

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

C++: #include <iostream>
#include <stdlib.h>
#include <string.h>
#include <sstream>
#include <iostream>
#include <math.h>
#include <iomanip>

using namespace std;

string float_to_string(float f, int digits)
{
  if (f == 0) {
    f = 0;
  }
  ostringstream oss;
  oss << setprecision(digits) << setiosflags(ios::fixed) << f;
  return oss.str();
}

void calc_and_output(int *c)
{
  float x = (float)(c[1]*c[5]-c[2]*c[4])/(c[1]*c[3]-c[0]*c[4]);
  float y = (float)(c[0]*c[5]-c[2]*c[3])/(c[0]*c[4]-c[1]*c[3]);

  cout << float_to_string(x, 3) << " " << float_to_string(y, 3) << endl;
}

int main(int argc, char const* argv[])
{
  int c[6];

  string line;
  while (getline(cin, line)) {
    istringstream iss(line);
    int val;
    int c[6];
    for (int i = 0; i < 6; i++) {
      iss >> val;
      c[i] = val;
    };

    calc_and_output(c);
  }

  return 0;
}

C++: #include <iostream>

using namespace std;

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

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

int main(){
	double a,b,c,d,e,f;
	while(cin>>a>>b>>c>>d>>e>>f){
		double det = a*e-b*d;
		double x = 1/det*(c*e - b*f);
		double y = 1/det*(-c*d + a*f);	
        if(x<0.0005)x=0;
        if(y<0.0005)y=0;

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