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<iostream>
#include<algorithm>
#include<cstdio>
//f = 108.233533
//puts sprintf( "%.3f", f )
using namespace std;
int main(){
	double a,b,c,d,e,f;
	//scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f);
	while(cin>>a>>b>>c>>d>>e>>f){
	double x,y;
	y=/*(double)*/ (c*d-a*f)/(b*d-a*e);
	x=/*(double)*/ (c-b*y)/a;
	printf("%.3f %.3f\n",x,y);
	}
	//printf("%.5f",f);
	return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
int main() {
    double a, b, c, d, e, f;
    while(cin >> a) {
        cin >> b >> c >> d >> e >> f;
        double x = (c * e - b * f) / (a * e - b * d);
        double y = (-c * d + a * f) / (a * e - b * d);
        if (abs(x) < 1e-3) x = 0.0;
        if (abs(y) < 1e-3) y = 0.0;
        cout << fixed << setprecision(3) << x << " " << y << endl;
    }
    return 0;
}

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

using namespace std;

int main(){
	cout << setprecision(3) << setiosflags(ios::fixed);
	double a, b, c, d, e, f;

	while(cin >> a >> b >> c >> d >> e >> f){
		cout << (c*e-f*b)/(a*e-d*b) + 0.000001<< " " << (c*d-f*a)/(b*d-a*e) + 0.000001 << '\n';
		}
	return 0;
}

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

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef unsigned long long ULL;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);

//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))

//debug
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

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

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

int fff(double x){
	if(x==(int)x){return 3;}
	else if(x*10==(int)(x*10)){return 2;}
	else if(x*100==(int)(x*100)){return 1;}
	else if(x*1000==(int)(x*1000)){return 0;}
}

int main(){
	double k[60000]={0};
	int i=0;
	while(cin>>k[i++]);
	int n=i-1;
	for(int j=0;j<n;j+=6){
		double x=0,y=0,a=k[j],b=k[j+1],c=k[j+2],d=k[j+3],e=k[j+4],f=k[j+5];
		x=(c*e-b*f)/(-b*d+a*e);
		y=(c*d-a*f)/(b*d-a*e);
		if(x==0)x=abs(x);
		if(y==0)y=abs(y);
		x*=1000,x=round(x),x/=1000;
		y*=1000,y=round(y),y/=1000;
		cout<<x;int fx=fff(x);
		if(fx==3){cout<<".000 ";}
		if(fx==2){cout<<"00 ";}
		if(fx==1){cout<<"0 ";}
		if(fx==0){cout<<" ";}
		cout<<y;int fy=fff(y);
		if(fy==3){cout<<".000";}
		if(fy==2){cout<<"00";}
		if(fy==1){cout<<"0";}
		cout<<endl;
		
	}
	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)
 {
      if(a>1000||a<-1000){
	    cout << "nomber error" <<endl;
	    return 0;
     }
      if(b>1000||b<-1000){
	    cout << "nomber error" <<endl;
	    return 0;
     }
      if(c>1000||c<-1000){
	    cout << "nomber error" <<endl;
	    return 0;
     }
      if(d>1000||d<-1000){
	    cout << "nomber error" <<endl;
	    return 0;
     }
      if(e>1000||e<-1000){
	    cout << "nomber error" <<endl;
	    return 0;
     }
      if(f>1000||f<-1000){
	    cout << "nomber error" <<endl;
	    return 0;
     }
    cout<<fixed<<setprecision(3)<<(c*e-b*f)/(a*e-b*d)<<" ";
    cout<<fixed<<setprecision(3)<<(c*d-a*f)/(b*d-a*e);
    cout<<endl;
 }

  return 0;
}

C++: 
#include <cmath>
#include <string>
#include <sstream>
#include <iostream>
#include <algorithm>

int main(void) 
{
    std::string str;
    float a, b, c, d, e, f;
    float x, y;

    while (getline(std::cin, str)) {
        std::istringstream str_s(str);

        str_s >> a >> b >> c >> d >> e >> f;

        if (c*e - b*f == 0) 
            x = 0;
        else
            x = (c*e - b*f) / (a*e - b*d);

        if (c*d - a*f == 0)
            y = 0;
        else
            y = (c*d - a*f) / (b*d - a*e);

        x = (float)round(x*100)/100;
        y = (float)round(y*100)/100;

        std::cout.setf(std::ios::fixed);  
        std::cout.precision(3);

        std::cout << std::showpoint << x << ' ' << y << '\n';
    }

    return 0;
}

C++: #include<stdio.h>
int main(){
	int a,b,c,d,e,f;
	double x,y;
	scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f);
	x=(double)(c*e-b*f)/(a*e-b*d);
	y=(double)(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);
	scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f);
	x=(double)(c*e-b*f)/(a*e-b*d);
	y=(double)(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 <cstdio>
#include <cstdlib>
#include <algorithm>

using namespace std;

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

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

	return 0;
}

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

double halfadjust(double x){
	int tmp = (x*10000);
	tmp = tmp%10;
	double ans = static_cast<double>(static_cast<int>(x*1000));
	ans = ans/1000;
	if(tmp >= 5)
		ans += 0.001;
	return ans;
}

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

void solve(){
	using namespace std;
	double x = (c*e-b*f)/(a*e-b*d);
	double y = (c*d-a*f)/(b*d-a*e);
	cout << setprecision(3) << fixed << halfadjust(x) << ' ';
	cout << halfadjust(y) << std::endl;
	cout << setprecision(6);
}

int main(){
	while(true){
		std::cin >> a >> b >> c >> d >> e >> f;
		if((!a&&!b)||(!d&&!e))
			break;
		solve();
	}
	return 0;
}