Go: package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	var strs []string
	var a, b, c, d, e, f float64
	var x, y float64
	for scanner.Scan() {
		strs = strings.Split(scanner.Text(), " ")
		_a, _ := strconv.Atoi(strs[0])
		_b, _ := strconv.Atoi(strs[1])
		_c, _ := strconv.Atoi(strs[2])
		_d, _ := strconv.Atoi(strs[3])
		_e, _ := strconv.Atoi(strs[4])
		_f, _ := strconv.Atoi(strs[5])
		a = float64(_a)
		b = float64(_b)
		c = float64(_c)
		d = float64(_d)
		e = float64(_e)
		f = float64(_f)
		y = (c*d - f*a) / (d*b - a*e)
		x = (c - b*y) / a

		fmt.Printf("%.3f %.3f\n", x, y)
	}
}

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

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

/// Ax=b
vec gauss_jordan(const mat& A,const vec& b){
    int n=A.size();
    mat B(n,vec(n+1));

    for(int i=0;i<n;i++)
        for(int j=0;j<n;j++)B[i][j]=A[i][j];

    for(int i=0;i<n;i++)B[i][n]=b[i];

    for(int i=0;i<n;i++){
        int pivot=i;
        for(int j=i+1;j<n;j++){
            if(abs(B[j][i])<abs(B[pivot][i]))pivot=j;
        }
        swap(B[i],B[pivot]);
        if(abs(B[i][i])<EPS)return vec();

        for(int j=i+1;j<=n;j++)B[i][j]/=B[i][i];
        for(int j=0;j<n;j++){
            if(i==j)continue;
            for(int k=i+1;k<=n;k++)B[j][k]-=B[j][i]*B[i][k];
        }
    }

    vec x(n);
    for(int i=0;i<n;i++)x[i]=B[i][n];
    return x;
}

int main(){
    mat A(2,vec(2));
    vec b(2);
    while(true){
        for(int i=0;i<2;i++){
            if(scanf("%lf%lf%lf",&A[i][0],&A[i][1],&b[i])==EOF)return 0;
        }

        vec x=gauss_jordan(A,b);
        if(x.size()<2)return 0;
        printf("%lf %lf\n",x[0],x[1]);
    }
    return 0;
}

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

using namespace std;

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

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

	y = ((((a * d) / a) * c) - (((a * d) / d) * f)) / ((((a * d) / a) * b) - (((a * d) / d) * e));
	x = (c - (b * y)) / a;

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

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(){
  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-a*x)/b;
    if(
    printf("%.3f %.3f\n",x,y);
  }
  

}

C++: try :
  while True :
    (a,b,c,d,e,f) = map(int, raw_input().split())

    print "%.3f %.3f"%((c*e-b*f)/(a*e-b*d), (a*f-c*d)/(a*e-b*d))
except EOFError :
  pass

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

using namespace std;

int main()
{
    double a, b, c, d, e, f;
    double x, y;
    while( 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 );

        x = x + ( 0.5 - ( x < 0 ) )/1000;
        y = y + ( 0.5 - ( y < 0 ) )/1000;
        x = int( x * 1000 );
        y = int( y * 1000 );
        if(x != 0) x /= 1000;
        if(y != 0) y /= 1000;

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

C++: #include<iostream>
#include<stdio.h>
int main(){
    double a,b,c,d,e,f;
    double x,y;
    while(std::cin>>a>>b>>c>>d>>e>>f){
    y=(a*f-d*c)/(a*e-b*d);
    x=(c-b*y)/a;
    printf("%.3f %.3f\n",x,y);
    }
    return 0;
}

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

int main(){
double a,b,c,d,e,f,a_,b_,c_,d_,e_,f_;
double x,y;
double in;
while (std::cin >>a>>b>>c>>d>>e>>f){
in = (a*e - b*d);
a_ = a/in;
b_ = -1*d/in;
d = -1*b/in;
e_ = e/in;
x = c * a_ + f*b_;
y = c*d_ + f*e_;
std::cout << std::setprecision(3) << std::fixed << x << ' ' << std::setprecision(3) <<std::<< std::fixed <<  y << std::endl;
}
    return 0;
}

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

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

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

C++: #include<iostream>
#include<cstdio>
#include<cctype>
#include<cstring>
#include<string>
#include<algorithm>
#include<queue>
#include<stack>
#include<iomanip>
using namespace std;

int main(){
double a,b,c,d,e,f,x,y;
while(cin>>a>>b>>c>>d>>e>>f){
	x=0.00;
	y=0.00;
	x=double((c*e-b*f)/(a*e-b*d));
	y=double((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;
}
return 0;
}

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

#include <math.h>
using namespace std;

int main()
{
	double A, B, C, D, E, F, X, Y, G , H;

	while(cin >> A >> B >> C >> D >> E >> F)
	{
		G = A / D;
		D *= G;
		E *= G;
		F *= G;
		Y = (F-C) / (E-B);
		
		D /= G;
		E /= G;
		F /= G;
		H = B / E;
		D *= H;
		E *= H;
		F *= H;
		X = (F-C) / (D-A);

		if(X==0){X=0;};
		if(Y==0){Y=0;};

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

  }
}

C++: // 失敗するからこそ そこから立ち向かって行く強さがあってそんな強さが本当の強さだと私は思うから
#ifdef DAIJOBU
#include "/home/v-o_o-v/deb.h"
#define deb(x...) cerr << "[" << #x << "] = ["; _print(x)
#else
#include <bits/stdc++.h>
#define deb(x...)
#endif 

using namespace std;

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

	int a, b, c, d, e, f;
	while(cin >> a >> b >> c >> d >> e >> f){
		int num_x = c * e - b * f, den_x = a * e - b * d;
		int num_y = c * d - a * f, den_y = b * d - a * e;
		long double X, Y;
		if(num_x == 0)X = 0.0;
		else X = num_x / (long double)den_x;
		if(num_y == 0)Y = 0.0;
		else Y = num_y / (long double)den_y;
		cout << fixed << setprecision(3);
		cout << X << ' ' << Y << '\n';
	}
	return 0;
}
// Write Here

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

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

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

    return 0;
    
    }

C++: #include <iostream>

using namespace std;

int main()
{
	int a,b,c,d,e,f;
	float x,y,dx,dy;
	while( cin >> a >> b >>c >>d >> e >> f ) {
		x = (c*e-b*f)/(float)(a*e-b*d);
		y = (c - a*x)/(float)b;
		
		dx =x -  (x / 0.001)*0.001;
		if( dx >= 0.0005)
			x = (x / 0.001)*0.001 + 0.001;
		else
			x = (x / 0.001)*0.001;

		dy =y -  (y / 0.001)*0.001;
		if( dy >= 0.0005)
			y = (y / 0.001)*0.001 + 0.001;
		else
			y = (y / 0.001)*0.001;
	
		printf("%.3f %.3f\n",x,y);
	}



	return 0;
}