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>

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

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

C++: #include <iostream>
#include <math.h>
#include <stdio.h>
#include <string>
#include <string.h>
#include <algorithm>
#include <cmath>
#include <limits>
#include <sstream>
#include <iomanip>

using namespace std;

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

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

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

C++: #include <iostream>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <iomanip>
#include <cassert>
using namespace std;

#define GET_ARG(a,b,c,F,...) F
#define REP3(i,s,e) for (i = s; i <= e; i++)
#define REP2(i,n) REP3 (i,0,(int)(n)-1)
#define REP(...) GET_ARG (__VA_ARGS__,REP3,REP2) (__VA_ARGS__)
#define RREP3(i,s,e) for (i = s; i >= e; i--)
#define RREP2(i,n) RREP3 (i,(int)(n)-1,0)
#define RREP(...) GET_ARG (__VA_ARGS__,RREP3,RREP2) (__VA_ARGS__)
#define DEBUG(x) cerr << #x ": " << x << endl

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

C++: #include <iostream>
using namespace std;
int main () {
	double m[4], e, f, d;
	cout.setf (ios::fixed); cout.precision (3);
	while (cin >> m[0] >> m[1] >> e >> m[2] >> m[3] >> f) {
		d = m[0]*m[3] - m[1]*m[2];
		cout << ((m[3]*e-m[1]*f)/d) << " " << ((m[0]*f-m[2]*e)/d) << endl;
	}
}

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

using namespace std;

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

C++: #include <iostream>
#include <algorithm>
#include <set>
#include <vector>
#include <sstream>
#include <typeinfo>

using namespace std;

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

C++: #include <stdio.h>

int main (void){
	int a, b, c, d, e, f;
	double ans[2];
	while(scanf("%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f)!=EOF){
		ans[0]=(double)(b*f-c*e)/(d*b-a*e);
		ans[0]*=10000;
		if((int)ans[0]%10>4){
			ans[0]-=(int)ans[0]%10;
			ans[0]+=10;
		}else{
			ans[0]-=(int)ans[0]%10;
		}
		ans[0]/=(double)10000;
		
		ans[1]=(double)(c*d-a*f)/(b*d-a*e);
		ans[1]*=10000;
		if((int)ans[1]%10>4){
			ans[1]-=(int)ans[1]%10;
			ans[1]+=10;
		}else{
			ans[1]-=(int)ans[1]%10;
		}
		ans[1]/=(double)10000;
		
		printf("%.3lf %.3lf\n", ans[0], ans[1]);
	}
	return 0;
}

C++: #include<iostream>
#include<iomanip>
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 - 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;
	}
}

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

double a, b, c, d, e, f;
int main()
{
	while(std::cin>>a>>b>>c>>d>>e>>f)
	{
		double x = (e*c-b*f)/(a*e-b*d);
		double y = (-d*c+a*f)/(a*e-b*d);
		printf("%.3lf %.3lf\n",x+(1e-10),y+(1e-10));
	}
	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 - b*f) / (a*e - b*d);
		double y = (a*f - c*d) / (a*e - b*d);
		printf("%.5f %.5f", x, y);
	}
    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<char> vc;
typedef vector<ll> vll;
typedef vector<vector<int>> vvi;
typedef vector<vector<string>> vvs;
typedef vector<vector<char>> vvc;
typedef vector<vector<bool>> vvb;
typedef pair<int,int> P;
#define vrep(v,n) for(int i=0;i<n;i++){cin >> v.at(i);} //配列vにn個の要素を入力する
#define rep(i, l, n) for (int i = l; i < (int)(n); i++)
#define repn(i, l, n) for (int i = l; i <= (int)(n); i++)
#define pb push_back 

const int mod = 1000000007;
const int inf = 1e9;

float round_n(float number, double n)
{
    number = number * pow(10,n-1); 
    number = round(number); 
    number /= pow(10, n-1); 
    if(number == -0) number += 0;
    return number;
}

int main(){
    while(1){
        float a = inf,b,c,d,e,f;
        cin >> a >> b >> c >> d >> e >> f;
        if(a == inf){break;}
        float x = (c*e-b*f)/(a*e-d*b);
        float y = (c*d-a*f)/(b*d-a*e);
        cout << fixed<<setprecision(3) << round_n(x, 4) << " " << fixed<<setprecision(3) << round_n(y,4) << endl;
    }
}

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

using namespace std;

int main(){
    int a,b,c,d,e,f;
    double X[6] = {};
    
    for(int i=0;i<6;i++)
    cin >> X[i];
    
    double y = ( X[2] * X[3] - X[0] * X[5]) / ( X[1] * X[3] - X[0] * X[4] );

    if( X[0] !=0 )
    cout << fixed << setprecision(3) << X[2] - X[1] * y / X[0] << " " << y << "\n";
    
    else
    cout << fixed << setprecision(3) << X[5] - X[4] * y / X[3] << " " << y << "\n";
}

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

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)
	{
		printf("%.3f ",(c*e-b*f)/(a*e-b*d)+0.0005);
		printf("%.3f\n",(d*c-a*f)/(b*d-a*e)+0.0005);


	}


}

//大文字を小文字に変換
/*
for(int i=0;i<inp.size();i++)
			if(inp[i]>='A' && inp[i]<='Z')
				inp[i]+='a'-'A';
*/