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<cstdio>
#include<cmath>
#include<algorithm>
#define rep(i,a,b) for(int i = (a); i<=(b); i++)
using namespace std;
const int num = 100;
double matrix[num][num + 1];   //邉サ謨ー遏ゥ髦オ?御サ?蠑?ァ?double ans[num];               //扈捺棡謨ー扈?
void exchange_col(int p1,int p2,int n)  //莠、謐「p1陦悟柱p2陦檎噪謇?怏謨ー謐ョ
{
    double t;
    int i;
    for(i = 0 ; i <= n ; i++)
        t = matrix[p1][i],matrix[p1][i] = matrix[p2][i],matrix[p2][i] = t;
}

bool gauss(int n)   //豎りァ」邉サ謨ー遏ゥ髦オ荳コn逧?コソ諤ァ譁ケ遞狗サ?{
    int i,j,k;
    int p;
    double r;

    for(i = 0 ; i < n - 1 ; i++)
    {
        p = i;
        for(j = i + 1 ; j < n ; j++)     //蟇サ謇セi蛻玲怙螟ァ蛟シ菴咲スョ
        {
            if(matrix[j][i] > matrix[p][i])
                p = j;
        }
        if(matrix[p][i] == 0) return false;
        if(p != i)     exchange_col(i,p,n);
        for(j = i + 1 ; j < n ; j++)         //蜑ゥ菴吝?霑幄。梧カ亥?
        {
            r = matrix[j][i] / matrix[i][i];
            for(k = i ; k <= n ; k++)
                matrix[j][k] -= r * matrix[i][k];
        }
    }
    for(i = n - 1 ; i >= 0 ; i--)     //闔キ蠕礼サ捺棡
    {
        ans[i] = matrix[i][n];
        for(j = n - 1 ; j > i ; j--)
            ans[i] -= matrix[i][j] * ans[j];
        ans[i] /= matrix[i][i];
    }
    return true;
}
int main()
{
    int i,j,t;
    while(scanf("%lf",&matrix[0][0])!=-1)
    {
        rep(i,1,2) scanf("%lf",&matrix[0][i]);
        rep(i,0,2) scanf("%lf",&matrix[1][i]);
        gauss(2);
        printf("%.3lf %.3lf\n",ans[0],ans[1]);
    }
    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<stdio.h>
using namespace std;
int main(){
double a,b,c,d,e,f;
double x,y;
while(cin >> a >> b >> c >> d >> e >> f){
  if(a*e-b*d != 0){
    x = (e*c-b*f) / (a*e-b*d);
    y = (-(d*c)+a*f) / (a*e-b*d);
  }

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

C++: #include <iostream>
#include <stdio.h>
#include <iomanip>
//#include <vector>
//#include <string>
//#include <algorithm>
//#include <functional>

using namespace std;

int main(){

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

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



	return 0;
}

C++: #include<stdio.h>
int main(){
	double a,b,c,d,e,f;
	double x,y,z,v;
	while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!=-1){
		x=(c*e-b*f)/(a*e-b*d);
		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;
		printf("%.3lf %.3lf\n",x,y);
	}
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define mp make_pair
#define it ::iterator
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double ESP=1e-10;
using namespace std;
int main(){
  int 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-a*x)/b;
    
    printf("%.3f %.3f\n",x,y);
  }
  

}

C++: //--------------------------------------------------template----------------------------------------//
//c
#include <stdio.h>
#include <time.h>
#include <math.h>
//c++
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <functional>
#include <cstdlib>
#include <sstream>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <vector>
#include <complex>
#include <cmath>
//c++11
#include <tuple>
#define all(c) ((c).begin(),(c).end())
#define rall(c) (c).rbegin(),(c).rend()
//#define sort(v,n) sort(v,v+n)
//#define vsort(v) sort(v.begin(),v.end())
#define vvsort(v) sort(v.rbegin(),v.rend())
#define ll long long
#define pb(a) push_back(a)
#define fi first
#define se second
#define inf 999999999
using namespace std;
const ll MOD = 1e9 + 7;
const double PI = acos(-1.0);
//---------------------------------------------------------------------------------------------//
double a, b, c, d, e, f;
double x, y;
int main() {
	while (cin >> a >> b >> c >> d >> e >> f) {
		x = (c*e - b*f) / (a*e - b*d);
		y = (c - a*x) / b;
		if (x == -1 * x)x = 0.000;
		if (y == -1 * y)y = 0.000;
		printf("%.3f %.3f\n", x, y);
	}
}

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

int main(){
	int a,b,c,d,e,f;
	while(cin >> a >> b >> c >> d >> e >> f){
		double tmpx = (c*e-b*f)/(a*e-b*d);
		double tmpy = (c*d-a*f)/(b*d-a*e);
		double fx = 1, fy = 1;
		if(tmpx<0){
			fx = -1;
		}
		if(tmpy<0){
			fy = -1;
		}
		double x = round(tmpx*fx*1000)/(fx*1000);
		double y = round(tmpy*fy*1000)/(fy*1000);
		printf("%.3f %.3f", x, y);
	}
}

C++: #include<iostream>
using namespace std;
double Emat(int a,int b,int c,int d);

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

double Emat(int a,int b,int c,int d){
	return a*d-b*c;
}

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

using namespace std;

int main()
{
 double a=0,b=0,c=0,d=0,e=0,f=0;
 double x,y;
	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);
 	
 	printf("%.3lf %.3lf\n",x,y);
	}
 return 0;
}

C++: #include<cstdio>
#include<algorithm>
#include<vector>
#include<string>
#include<iostream>
#include<queue>
#include<map>
#include<set>

using namespace std;

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

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

C++: #include <stdio.h>
using namespace std;
int main() {
	int a, b, c, d, e, f;
	double x, y;
	while(scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f) != EOF) {
		int a1 = a, b1 = b, c1 = c, d1 = d, e1 = e, f1 = f;
		a1 *= e;
		b1 *= e;
		c1 *= e;
		d1 *= b;
		e1 *= b;
		f1 *= b;
		printf("%.3f ", (double) (f1 - c1) / (d1 - a1));
		a *= d;
		b *= d;
		c *= d;
		d *= a;
		e *= a;
		f *= a;
		printf("%.3f\n", (double) (f - c) / (e - b));
	}
	return 0;
}

C++: #include<bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
	float a,b,c,d,e,f,x,y;
	while(cin>>a>>b>>c>>d>>e>>f){
		y=(a*f-d*c)/(e*a-d*b);
		x=(c-b*y)/a;
		printf("%.3f %.3f\n",x,y);
	}
}