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 <iomanip>
#include<cmath>

using namespace std;

void Round(double &refX)
{
    const double eps = 0.001;
    if( abs(refX) < eps)
        refX = 0;
}
  
int main()
{
    int a,b,c,d,e,f;
    double x,y;
    while(cin>>a>>b>>c>>d>>e>>f)
    {
                 
            if (a*e == b*d)
            {
                   //cout<<'No Answer'<<endl; 
                   continue;
             }
             x= (c*e-b*f)/(a*e-b*d);
             y= (c*d-a*f)/(b*d-a*e);
  

             Round(x);
             Round(y);

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

C++: #include<stdio.h>
int main(void){
	double a,b,c,d,e,f;
	double A,B,C,D,E,F;
	double x,y;
	while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f)!=EOF){
		B=b*d;
		C=c*d;
		E=a*e;
		F=a*f;
		printf("here\n");
		y=(C-F)/(B-E);
		A=a*e;
		C=c*e;
		D=b*d;
		F=b*f;
		printf("go home\n");
		x=(C-F)/(A-D);
		printf("%1.3lf %1.3lf\n",x,y);
	}
	return 0;
}

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

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

	while (cin >> a >> b >> c >> d >> e >> f) {
		//a*d-b*c=0:?§£??????
		G = 1 / (a*e - b*d);
		x = G*(e*c + (-b)*f);
		y = G*((-d)*c + a*f);
		cout << fixed << setprecision(3) << x << " " << y << endl;
	}

	return 0;
}

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

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

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

	cout << x << " " << y << endl;

	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
//#include <boost/multiprecision/cpp_int.hpp>
//using multiInt = boost::multiprecision::cpp_int;

using ll = long long int;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
template<typename Q_temp>
using smaller_queue = priority_queue <Q_temp, vector<Q_temp>, greater<Q_temp> >;

const int INF = (int) 1e9;
const ll LINF = (ll) 4e18;
const ll MOD = (ll) (1e9 + 7);
const double PI = acos(-1.0);
const int limit = 100010;

#define REP(i,m,n) for(ll i = m; i < (ll)(n); ++i)
#define rep(i,n) REP(i, 0, n)
#define MP make_pair
#define MT make_tuple
#define YES(n) cout << ((n) ? "YES" : "NO") << endl
#define Yes(n) cout << ((n) ? "Yes" : "No") << endl
#define Possible(n) cout << ((n) ? "Possible" : "Impossible") << endl
#define all(v) v.begin(), v.end()
#define NP(v) next_permutation(all(v))
#define dbg(x_) cerr << #x_ << ":" << x_ << endl;
#define dbg2(x_) for(auto a_ : x_) cerr << a_ << " "; cerr << endl;
#define dbg3(x_ , sx_) rep(i, sx_) cerr << x_[i] << " "; cerr << endl;
vector<int> Dx = {0, 0, -1, 1, -1, 1, -1, 1, 0};
vector<int> Dy = {1, -1, 0, 0, -1, -1, 1, 1, 0};

inline ll CEIL(ll a, ll b) {
    return (a + b - 1) / b;
}

//------------------------------------------------------

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    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);
        cout << fixed << setprecision(3) << x << " " << y << endl;
    }

    return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
#define all(vec) vec.begin(),vec.end()
typedef long long int ll;
typedef pair<int,int> P;
const ll MOD=1000000007;
const ll INF=1000000010;
const ll LINF=4000000000000000010LL;
const int MAX=310;
const double EPS=1e-8;
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
int main(){
    double 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=(-b*y+c)/a;
        x*=1000;
        printf("%.3f\n",round(x)/1000);
        y*=1000;
        printf("%.3f ",round(y)/1000);
    }
}

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

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

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

C++: #include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <algorithm>
#include <numeric>
#include <complex>
#include <functional>
#include <utility>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>

using namespace std;

#define debug(n) cout<<"# "<<#n<<": "<<(n)<<endl
#define repi(i,a,b) for(int i=int(a);i<int(b);i++)
#define rep(i,n) repi(i,0,n)
#define iter(c) __typeof((c).begin())
#define tr(c,i) for(iter(c) i=(c).begin();i!=(c).end();i++)
#define allof(c) (c).begin(),(c).end()
#define mp make_pair

typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,int> pii;

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

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

int main(int argc, const char * argv[])
{
    double a, b, c, d, e, f, x, y;
    //cin >> a >> b >> c >> d >> e >> f
//    while (scanf("%lf %lf %lf %lf %lf %lf ", &a, &b, &c, &d, &e, &f) != EOF) {
    
    while (std::cin >> a >> b >> c >> d >> e >> f) {
        x = y = 0;
        x = (b*f - c*e) / (b*d - a*e);
        y = ((a*b*f - a*c*e) / (a*b*e- b*b*d) + c / b);
        printf("%.3f %.3f\n", x, y);
    }
    
    return 0;
}

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) {
		cout << a << endl;
	}
	return 0;
}

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

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

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

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

    return 0;
}

C++: #include <cstdio>
 
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 y = (d * c - a * f) / (d * b - a * e);
        double x = (c - b * y) / a;
        printf("%.3f %.3f\n", x, y);
    }
 
    return 0;
}