Go: package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	for scanner.Scan() {
		strNums := strings.Fields(scanner.Text())
		nums := []int{}
		for _, strNum := range strNums {
			num, _ := strconv.Atoi(strNum)
			nums = append(nums, num)
		}
		a := nums[0]
		b := nums[1]
		c := nums[2]
		d := nums[3]
		e := nums[4]
		f := nums[5]
		var mulA, mulD int
		if a < 0 {
			mulA = a * -1
		} else {
			mulA = a
		}
		if d < 0 {
			mulD = d * -1
		} else {
			mulD = d
		}
		a *= mulD
		b *= mulD
		c *= mulD
		d *= mulA
		e *= mulA
		f *= mulA

		if d < 0 {
			d *= -1
			e *= -1
			f *= -1
		}

		bE := b - e
		cF := c - f
		if bE == 0 {
			bE = 1
		}
		y := cF / bE
		x := (c - (y * b)) / a

		fmt.Print(x)
		fmt.Print(".000 ")
		fmt.Print(y)
		fmt.Println(".000")
	}
}

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

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

using namespace std;

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

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

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


	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <set>
#include <vector>
#include <sstream>
#include <typeinfo>

using namespace std;

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

C++: #include <iostream>
#include <stack>
#include <map>
#include <algorithm>
#include <sstream>
#include <queue>
#include <string>
#include <iomanip>
#include <cstring>
#include <cstdlib>
#include <cstdio>
#include <cmath>
using namespace std;
#define F first
#define S second
const int INF=100000000;


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

		printf("%.3Lf %.3Lf\n",x,y);
		//cout << setprecision(3)  << x << " " << y << endl;
	}
	return 0;
}

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

int main(){
    double a[3],b[3];
    double x=0,y=0;
    while(cin >> a[0] >> a[1] >> a[2] >> b[0] >> b[1] >> b[2]){
        x = (b[1]*a[2] - a[1]*b[2])/(a[0]*b[1] - a[1]*b[0]);
        y = (a[0]*b[2] - a[2]*b[0])/(a[0]*b[1] - a[1]*b[0]);
        x = (x<0.001 && x>-0.001) ? 0.0 : x;
        y = (y<0.001 && y>-0.001) ? 0.0 : y;
        cout << fixed << setprecision(3) <<  x << " " << y << endl;
    }
}

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

int main()
{
        using namespace std;
        double a,b,c,d,e,f;

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

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

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

using namespace std;
int main(){
    float a,b,c,d,e,f;
    while((cin>>a>>b>>c>>d>>e>>f)){
        printf("%.3f %.3f",(c*e-b*f)/(a*e-b*d),(c*d-a*f)/(b*d-a*e));
    }
    return 0;
}

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

C++: #include <iostream>
 
using namespace std;
 
int main(int argc, char **argv)
{
    double a, b, c, d, e, f, tmp, s, t;
     
    while((cin >> a >> b >> c >> d >> e >> f)){
        tmp = (a*e-b*d);
        s = ((e*c-b*f)/tmp);
        t = ((a*f-d*c)/tmp);
         
        if(s == -0.0){
            s = 0.0;
        }
        if(t == -0.0){
            t = 0.0;
        }
        printf("%.3f %.3f\n", s, t);
    }
     
    return 0;
}

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

using namespace std;

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

	while (cin >> a >> b >> c >> d >> e >> f)
	{
		odd = b / e;

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

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

	}


	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
#define REP(i,N) for(int i = 0; i < (int)N; i++)

double det(double a1,double a2,double a3,double a4){
	return a1*a4-a2*a3;
}

int main(){
	double a,b,c,d,e,f;
	while(cin >> a >> b >> c >> d >> e >> f){
		double g,h,i;
		g = det(a,b,d,e);
		h = det(c,b,f,e);
		i = det(a,c,d,f);
		double j,k;
		j = h/g;
		k = i/g;
		j = round(j*pow(10,3))/pow(10,4);
		k = round(k*pow(10,3))/pow(10,4);
		printf("%.3f %.3f",j,k);
	}
	return 0;
}

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

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef complex<double> P;
typedef pair<int,int> pii;
#define REP(i,n) for(ll i=0;i<n;++i)
#define REPR(i,n) for(ll i=1;i<n;++i)
#define FOR(i,a,b) for(ll i=a;i<b;++i)

#define DEBUG(x) cout<<#x<<": "<<x<<endl
#define DEBUG_VEC(v) cout<<#v<<":";REP(i,v.size())cout<<" "<<v[i];cout<<endl
#define ALL(a) (a).begin(),(a).end()

#define MOD (ll)(1e9+7)
#define ADD(a,b) a=((a)+(b))%MOD
#define FIX(a) ((a)%MOD+MOD)%MOD

int main(){
  double a,b,c,d,e,f;
  while(~scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)){
    // ax+by=c
    // dx+ey=f
    double x,y;
    if(abs(b)<1e-9){
      x = c/a;
      y = (f-d*x)/e;
    }else{
      x = (b*f-c*e)/(b*d-a*e);
      y = (f-d*x)/e;
    }
    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;
	while (cin >> a >> b >> c >> d >> e >> f) {
		// ???????????????(???????????????????????????????????????)
		// ?¬¬?????????x????????°???1?????????
		b /= a;
		c /= a;
		a = 1;
		// ????????¶?????§???????¨???? (e-bd)y = f-cd ?????????????????????
		double y = (f - c*d) / (e - b*d);
		double x = c - b * y;
		printf ("%1.3f %1.3f",x,y);
		cout << endl;
	}
	return 0;
}