Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Split(bufio.ScanWords)
	for {
		data := nextInts(6)
		if data[0] == 0 || data[1] == 0 || data[2] == 0 || data[3] == 0 || data[4] == 0 || data[5] == 0 {
			break
		}
		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 ((c * e) - (b * f)) / ((a * e) - (b * d))
}

func GetY(a, b, c, d, e, f float64) float64 {
	return ((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>
#include <vector>
#include <utility>
#include <algorithm>
#include <iostream>
#include <limits>
#include <iomanip>
using namespace std;
#define rep(i,n) for(int i=0;i<n;++i)
#define ld long double
ld a, b, c, d, e, f, x, y;
ld shish(ld a)
{
	if (a == 0) { return a; }
	
	a *= 1000;
	if (a > 0) {
		a += 0.51;
	}
	else {
		a -= 0.51;
	}
	a = (ld)((int)a);
	a /= 1000;
	return a;
}
int main() {
	while (cin >> a >> b >> c >> d >> e >> f) {
		y = (a*f - c*d) / (ld)(a*e - b*d);
		x = (c*e - f*b) / (ld)(a*e - b*d);

		x = shish(x);
		y = shish(y);
		if (x == 0) { cout << "0.000"; }
		else {
			cout << fixed << setprecision(3) << x;
		}
		cout << " ";
		if (y == 0) { cout << "0.000" << endl; }
		else{
			cout << fixed << setprecision(3) << y << endl;
		}
	}
	return 0;
}

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

int main(){
	double a,b,c,d,e,f;
	double x,y;
	
	cin >> a >> b >> c >> d >> e >> f ;
	
	y = (f - d*c/a )/(e - b*d/a );
	x = (c - b*y)/a;
	
//	cout << x << endl << y << endl;
	printf("%.3f\n",x);
	printf("%.3f\n",y);
	
}

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

int main(void)
{
	 double a, b, c, d, e, f, x, y;
	 while(cin >> a >> b >> c >> d >> e >> f){
	 	x = (b * f - c * e) / (b * d - a * e);
	 	y = (a * f - d * c) / (a * e - b * d);
	 	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,x,y;

	while(cin>>a>>b>>c>>d>>e>>f){
		x=(c*e-b*f)/(a*e-b*d);
		y=(c*d-a*f)/(b*d-a*e);
		if(abs(x)<0.001) x=0.000;
		if(abs(y)<0.001) y=0.000;
		cout<<fixed<<setprecision(3)
		    <<x<<" "<<y<<endl;
	}
}

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 = (c-b*y)/a;
		printf("%.3lf %.3lf\n",x,y);
	}
}

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

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

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

double mround(double a){
	if(a<0)return a-0.0005;
	return a+0.0005;
}
int main(){
	double a[6];
	double x,y;
	while(cin>>a[0]>>a[1]>>a[2]>>a[3]>>a[4]>>a[5]){
		double b=a[1]/a[4];
		for(int i=0;i<3;i++)a[3+i]*=b;
		x=(a[2]-a[5])/(a[0]-a[3]);
		y=(a[2]-x*a[0])/a[1];

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


	return 0;
}

C++: #include<iostream>

using namespace std;

int main(){
	//Cramer's Rule
	double a, b, c, d, e, f;

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

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

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

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(){
  double m[2][2],x[2],y[2],det,i[2][2];
  while(cin >>m[0][0]>>m[0][1]>>y[0]>>m[1][0]>>m[1][1]>>y[1]){
    det = m[0][0]*m[1][1]-m[1][0]*m[0][1];
    i[0][0] = m[1][1]/det;
    i[0][1] = -m[0][1]/det;
    i[1][0] = -m[1][0]/det;
    i[1][1] = m[0][0]/det;
    x[0] = i[0][0]*y[0]+i[0][1]*y[1];
    x[1] = i[1][0]*y[0]+i[1][1]*y[1];
    printf("%.3lf %.3lf\n",x[0],x[1]);
  }
  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()
{
	float a,b,c,d,e,f, x, y;
	while(~scanf("%f%f%f%f%f%f", &a, &b, &c, &d, &e, &f))
	{
		if(MyEqualDoule(a*e-b*d,0))
			x = 0;
		else
			x = (c*e-f*b)/(a*e - b*d);

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

C++: #include <stdio.h>


int main(void){
    double a, b, c, d, e, f;
    double x, y;
    int tmp;

    while (scanf("%lf %lf %lf %lf %lf %lf", 
    &a, &b, &c, &d, &e, &f)==6){
        x = (e*c-b*f)/(a*e-b*d);
        y = (-d*c+a*f)/(a*e-b*d);
        // round
        tmp = (int)(x*1000) % 10;
        if (x<5) x -= tmp/1000;
        if (x>=5) x += (10-tmp)/1000;
        tmp = (int)(y*1000) % 10;
        if (y<5) y -= tmp/1000;
        if (y>=5) y += (10-tmp)/1000;
        // output
        printf("%.3f %.3f\n", x, y);
    }
    return 0;
}

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

using namespace std;

#define rep(i, n) for (int i = 0; i < int(n); ++i)

int main() {
  double a, b, c, 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 (-0.0005 <= x && x < 0.0005) x = 0;
    if (-0.0005 <= y && y < 0.0005) y = 0;
    printf("%.3f %.3f\n", x, y);
  }
  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("%.3f ", (cx - f) / (ax - d) == -0 ? 0 : (cx - f) / (ax - d));
    b *= dd, c *= dd;
    printf("%.3f\n", (c - f) / (b - e) == -0 ? 0 : (c - f) / (b - e));
  }
  return 0;
}

C++: #include <math.h>
#include <iostream>
#include <ios>
#include <iomanip>
#include <algorithm>
#include <functional>
#include <string>

#define YES "YES"
#define NO "NO"
#define space ' '

using namespace std;

void func();

int main(void)
{
	
	func();

	return 0;
}

// using matrix	?????????????????´??????
void func()
{
	int a, b, c, d, e, f;
	double x, y;

	while (cin >> a >> b >> c >> d >> e >> f, !cin.eof()){


	//	if ((a*e - d*b) == 0)
		{
		//	cout << 0 << space << 0 << endl;
		}
//		else
		{
			x = (e*c - b*f) / (a*e - d*b);
			y = (-d*c + a*f) / (a*e - d*b);

			cout << fixed << setprecision(3);
			cout << x*0.0005 << space << y+0.0005 << endl;
			cout << dec;
		}
	}
}

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

using namespace std;

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

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