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)
		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 <stdio.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)
	{
		X=(C*E-F*B)/(A*E-D*B);
		Y=(A*F-D*C)/(A*E-D*B);

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

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

		printf("%.3f %.3f\n",X,Y);
	}
}

C++: #include <stdio.h>
double round3(double a){
	a=a*10000;
	if(int(a)%10>=5){
		a=a+10-int(a)%10;
	}else{
		a=a-int(a)%10;
	}
	a=a/10000;
	return a;

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

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

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

C++: #include <stdio.h>

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

C++: #include<cstdio>
int main(){
    float a[6];
    float x,y;
    while(~scanf("%f",&a[0])){
        for(int i=1;i<6;i++){
            scanf("%f",&a[i]);
        }
        y=(a[2]-(a[5]*(a[0]/a[3])))/(a[1]-(a[4]*(a[0]/a[3])));
        x=(a[2]-a[1]*y)/a[0];
        printf("%.3f %.3f\n",x,y);
    }
}

C++: #include <iostream>
#include <stdio.h>
#include <math.h>
using namespace std;

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

C++: #include <iostream>
#include <algorithm>
#include <cstdio>
#include <cmath>
using namespace std;
const double eps = 1e-3;

bool equals(double a, double b) {
  return abs(a-b) < eps;
}

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

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

C++: #include<stdio.h>
int main(void){

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

	while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF){
		 
	 
	 if ( (a > 0 && d <　0)|| (a > 0 && d > 0)) {
		A = c*d - f*a;
		B = b*d - e*a;
        y = A / B;
    }
    
    else if ((a <= 0 && d >= 0) || (a <= 0 && d <= 0)) {
		A = c*d + f*a;
		B = b*d + e*a;
        y = A / B;
    }


    x = (c - y * b) / a;
	printf("%.3f %.3f\n" ,x , y);
	}
	return 0;

}

C++: #include <stdio.h>

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

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

C++: #include <cstdio>

#define X 0
#define Y 1
#define C 2
#define SIKI1 0
#define SIKI2 1
#define LEFT  0
#define RIGHT 1

int main(){
	double A[3][3][3];
	double n[6];

	while ( scanf("%lf %lf %lf %lf %lf %lf",&n[0],&n[1],&n[2],&n[3],&n[4],&n[5]) != EOF ){
		//ÏÌú»
		for (int i=0 ; i<=RIGHT ; i++){
			for (int j=0 ; j<=SIKI2 ; j++){
				for (int k=0 ; k<=C ; k++){
					A[i][j][k] = 0;
				}
			}
		}

		//lÌãü
		A[LEFT][SIKI1][X]  = n[0];
		A[LEFT][SIKI1][Y]  = n[1];
		A[RIGHT][SIKI1][C] = n[2];
		A[LEFT][SIKI2][X]  = n[3];
		A[LEFT][SIKI2][Y]  = n[4];
		A[RIGHT][SIKI2][C] = n[5];

		//®PÌXð¶Ó©çEÓÖÚ·é
		A[ RIGHT ][ SIKI1 ][ X ]  += (-1.0)*(A[ LEFT ][ SIKI1 ][ X ]);
		A[ LEFT  ][ SIKI1 ][ X ]  = 0;

		//®PÌ¼ÓðYÌWÅé		
		A[ RIGHT ][ SIKI1 ][ X ]  /= A[ LEFT ][ SIKI1 ][ Y ];
		A[ RIGHT ][ SIKI1 ][ C ]  /= A[ LEFT ][ SIKI1 ][ Y ];
		A[ LEFT  ][ SIKI1 ][ Y ]  = 1;

		//®QÌYÉãüµÄ®Qð(ax = b)Ì`É·é
		int a = A[ LEFT ][ SIKI2 ][ Y ];
		A[ LEFT  ][ SIKI2 ][ X ]  += a * A[ RIGHT ][ SIKI1 ][ X ];
		A[ LEFT  ][ SIKI2 ][ Y ]   = 0;
		A[ RIGHT ][ SIKI2 ][ C ]  += a * A[ RIGHT ][ SIKI1 ][ C ] * (-1.0);
		//XYÌðªÜé
		double answerX = A[ RIGHT ][ SIKI2 ][ C ] / A[ LEFT ][ SIKI2 ][ X ];
		double answerY = (n[2] + n[0]*answerX*(-1.0))/n[1];
		
		//¬æSÊðlÌÜü·é
		if ( (((int)(answerX*10000))%10) >= 5){
			answerX += 0.001;
		}
		if ( (((int)(answerY*10000))%10) >= 5){
			answerY += 0.001;
		}
		if (answerX==-0.0){
			answerX = 0;
		}
		
		//ðÌoÍ
		printf("%.3f %.3f\n", answerX , answerY);
	}

	return 0;
}

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 <stdio.h>

int main(){
	int i,j;
	int a,b,c,d,e,f;
	int tmp;
	float x,y;
		
	while(scanf("%d %d %d %d %d %d\n",&a,&b,&c,&d,&e,&f)!=-1){
		tmp = d;
		d*=a; e*=a; f*=a;
		a*=tmp; b*=tmp; c*=tmp;
		y=(float)((c-f)/(b-e));
		x=(float)((c-b*y)/a);
		if(x==-0.000000){
			x = 0.000000;
		}
		if(y==-0.000000){
			y = 0.000000;
		}
		printf("%0.3f %0.3f\n",x,y);
	}
	
	
	return 0;
}

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

using namespace std;

void solve(int a, int b, int c, int d, int e, int f) {
	double???y=(a*f-c*d)/(a*e-b*d);;
	double???x=(c-b*y)/a;;
	
	print("%.3f %.3f\n",x,y);;
}

int main() {
	int a, b, c, d, e, f;
	while (cin >> a >> b >> c >> d >> e >> f) {
		solve(a,b,c,d,e,f);
	}
	return 0;
}