Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func read() string {
	sc.Scan()
	return sc.Text()
}

func main() {
	sc.Split(bufio.ScanLines)
	for sc.Scan() {
		s := strings.Split(sc.Text(), " ")
		a, _ := strconv.ParseFloat(s[0], 64)
		b, _ := strconv.ParseFloat(s[1], 64)
		c, _ := strconv.ParseFloat(s[2], 64)
		d, _ := strconv.ParseFloat(s[3], 64)
		e, _ := strconv.ParseFloat(s[4], 64)
		f, _ := strconv.ParseFloat(s[5], 64)
		x := ((b * f) - (c * e)) / ((b * d) - (a * e))
		y := ((a * f) - (c * d)) / ((a * e) - (b * d))
		if x == 0 {
			fmt.Printf("0.000 %.3f\n", y)
		} else if y == 0 {
			fmt.Printf("%.3f 0.000\n", x)
		} else {
			fmt.Printf("%.3f %.3f\n", x, y)
		}
	}
}

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

int main(){
	double a[6];
	double x,y;
	cout<< setprecision(4) << setiosflags(ios::showpoint);
	while(true){
		if(cin.eof())
			break;
		cin >> a[0];
		cin >> a[1];
		cin >> a[2];
		cin >> a[3];
		cin >> a[4];
		cin >> a[5];

			
		x = (a[4]*a[2]-a[1]*a[5])/(a[0]*a[4]-a[1]*a[3]);
		y = (-a[3]*a[2]+a[0]*a[5])/(a[0]*a[4]-a[1]*a[3]);
		if(x == 0)
			x = 0;
		if(y == 0)
			 y = 0;
			 
		cout << x << " " << y << endl;
	}
	return 0;
}

C++: #include <cstdio>

//input
int a, b, c, d, e, f;

void solve(){
	double x = 1.0 * (c * e - b * f) / (a * e - b * d);
	double y = (c - a * x) / b;
	if(x == -0)x = 0;
	if(y == -0)y = 0;
	printf("%.3lf %.3lf\n", x, y);
}

int main(int argc, char const *argv[]){
//	freopen("in.txt", "r", stdin);

	while(scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f) != EOF){
		solve();
	}
	
	return 0;
}

C++: #include<bits/stdc++.h>
using ll = long long;
using namespace std;

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	cout << fixed << setprecision(3);
	double a,b,c,d,e,f;
	while(cin >> a >> b >> c >> d >> e >> f){
		double x = (e*c-b*f)/(e*a-b*d);
		double y = (d*c-a*f)/(d*b-a*e);

		x = round(x*1000)/1000+10e-5;
		y = round(y*1000)/1000+10e-5;

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

	return 0;
}

C++: #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
#define all(a)  (a).begin(),(a).end()
#define vi vector<int>
#define pb push_back
#define INF 999999999

const double EPS = 1e-8;
typedef vector<double> vd;
typedef vector<vd> mat;

//Ax=b????§£??? A?????£?????????
//?§£??????or????????§?????? ??´????????????0???vector?????????
vd gauss_jordan(const mat& A, const vd& b){
    int n=A.size();
    mat B(n,vd(n+1));
    rep(i,n) rep(j,n) B[i][j]=A[i][j];
    
    rep(i,n) B[i][n] = b[i];                                    //??????A????????????b?????????????????????????????????
    
    rep(i,n){
        int pivot = i;
        for(int j=i;j<n;j++){                                   //??¨????????????????????°????????°?????¶???????????§????????????i??????????????£?????????
            if(abs(B[j][i])>abs(B[pivot][i]))pivot = j;
        }
        swap(B[i],B[pivot]);
        
        if(abs(B[i][i])<EPS)return vd();                        //?§£??????or????????§??????
        
        for(int j=i+1;j<=n;j++)B[i][j]/=B[i][i];                //??¨????????????????????°????????°???1?????????
        rep(j,n){
            if(i!=j){
                for(int k=i+1;k<=n;k++)B[j][k]-=B[j][i]*B[i][k];//j??????????????°????¶????
            }
        }
    }
    vd x(n);
    rep(i,n)x[i]=B[i][n];    //??????????????????b????§£?????????
    return x;
}

int main(){
    int a,b,c,d,e,f;
    while(cin>>a>>b>>c>>d>>e>>f){
        vd vec;
        vec.pb(c);
        vec.pb(f);
        mat mvec;
        vd x,y;
        x.pb(a);
        x.pb(b);
        y.pb(d);
        y.pb(e);
        mvec.pb(x);
        mvec.pb(y);
        vd res = gauss_jordan(mvec, vec);
        printf("%.3lf %.3lf\n",res[0],res[1]);
    }
}

C++: #include<iostream>
#include<iomanip>
using namespace std;
int main(void) {
    double a, b, c, d, e, f;
    while(cin >> a >> b >> c >> d >> e >> f){
        double x = (f - (c*e/b)) / (d - ((a*e)/b));
        double y = (c/b) - (a/b) * x;

        cout << fixed;
        cout << setprecision(3) << x << ' ' << y << endl;
    }
}

C++: #include <iostream>
#include <cstdio>
int main(void){
	double a,b,c,d,e,f,x,y;
	while(std::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(x==0)x=0;
		if(y==0)y=0;
		printf("%.3f %.3f\n",x,y);
	}
}

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

int main(){
	double a,b,c,d,e,f;
	while(cin>>a>>b>>c>>d>>e>>f){
		double det = a*e-b*d;
		double x = 1/det*(c*e - b*f);
		double y = 1/det*(-c*d + a*f);	
        if(x == -0.0) x=0;
        if(y == -0.0) y=0;

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

C++: // 20151005
// ??????????????\????????¶?????????




#include<stdio.h>




int main() {
  double a, b, c; // ??? 1 ????????°
  double d, e, f; // ??? 2 ????????°




  /* ??\??? */
  while ((scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f)) != EOF) {
    /** ??¶?´??????? **/
    if (a < -1000 && a > 1000) break;
    if (b < -1000 && b > 1000) break;
    if (c < -1000 && c > 1000) break;
    if (d < -1000 && d > 1000) break;
    if (e < -1000 && e > 1000) break;
    if (f < -1000 && f > 1000) break;
    /*** ??????????????? ***/
    /**** (1, 1) ??? 1 ??? ****/
    b = b / a;
    c = c / a;
    a = a / a; // ????????????
    /* printf("--------------------------\n"); */
    /* printf("%f %f %f\n", a, b, c); */
    /* printf("%f %f %f\n", d, e, f); */
    /***** (2, 1) ??? 0 ???*****/
    e = e - b * d;
    f = f - c * d;
    d = d - a * d; // ????????????
    /* printf("--------------------------\n"); */
    /* printf("%f %f %f\n", a, b, c); */
    /* printf("%f %f %f\n", d, e, f); */




    /**** (2, 2) ??? 1 ??? ****/
    d = d / e;
    f = f / e;
    e = e / e; // ????????????
    /* printf("--------------------------\n"); */
    /* printf("%f %f %f\n", a, b, c); */
    /* printf("%f %f %f\n", d, e, f); */
    /***** (1, 2) ??? 0 ???*****/
    a = a - d * b;
    c = c - f * b;
    b = b - e * b; // ????????????
    /* printf("--------------------------\n"); */
    /* printf("%f %f %f\n", a, b, c); */
    /* printf("%f %f %f\n", d, e, f); */




    /* ??¨??? */
    printf("%0.3f %0.3f", c, f);
  }
			



  /* ?????? */
  return 0;
}

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

int main() {
	double x,y,a,b,c,d,e,f;
	while(6 == scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)){
		x = (-b*f+e*c)/(a*e-b*d);
		y = (f-d*x)/e;
		if(x == 0){
        	x = 0.000;
	    }
		if(y == 0){
        	y = 0.000;
		}

		printf("%.3lf %.3lf\n",x,y);
	}
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
double a, b, c, d, e, f, X, Y;
int main () {
	while (scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!=EOF) {
		X=(c*e-f*b)/(a*e-d*b);
		Y=(c*d-f*a)/(b*d-e*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){
		double denom = a * e - b * d;
		double x = (c * e - b * f) / denom;
		double y = (a * f - c * d) / denom;
		if(x == 0) x = 0;
		if(y == 0) y = 0;
		printf("%.3lf ", x);
		printf("%.3lf\n", y);
	}
	return 0;
}

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

using namespace std;

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