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.Printf("%d.000 ", x)
		fmt.Printf("%d.000\n", y)
	}
}

C++: #include<iostream>
#include<iomanip>
#include<sstream>
#include<string>
#include<algorithm>
#include<cmath>
#include<cstdio>
#include<map>
#include<vector>
#include<queue>
#include<set>
#include<numeric>

using namespace std ;

#define pb(n) push_back(n)
#define fi first
#define se second
#define np string::npos
#define all(r) (r).begin(),(r).end()
#define gsort(st,en) sort((st),(en),greater<int>())
#define vmax(ary) *max_element(all(ary))
#define vmin(ary) *min_element(all(ary))
#define debug(x) cout<<#x<<": "<<x<<endl

#define rep(i,n) for(int i = 0; i < (int)(n);++i)
#define repc(i,a,b) for(int i = (a);i < (int)(b);++i)
#define repi(it,array) for(auto it = array.begin(),end = array.end(); it != end;++it)
#define repa(n,array) for(auto n :(array))

typedef long long ll ;
typedef vector<int> vi ;
typedef vector<ll> vl ;
typedef map<string,int> dict;

constexpr int imax = ((1<<30)-1)*2+1 ;
constexpr int inf = 100000000;
double eps = 1e-10 ;

template <typename T>
void out(vector < T > v)
{
  for(size_t i = 0; i < v.size(); i++)
  {
    debug(v[i]);
  }
}

template<typename T>
string ntos( T i ) {
  ostringstream s ;
  s << i ;
  return s.str() ;
}

template<typename T>
T ston(string str, T n){
  istringstream sin(str) ;
  T num ;
  sin >> num ;
  return num ;
}

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  double a,b,c,d,e,f,x,y;
  while(cin >> a >> b >> c >> d >> e >> f){
    x = (b*f-e*c)/(b*d-e*a) * 1000 ;
    if(x > 0){
      x += 0.5 ;
    }
    else if(x < 0){
      x -= 0.5 ;
    }
    x = (double)((int)(x))/1000.0 ;
    y = (c*d-a*f)/(b*d-e*a) * 1000 ;
    if(y > 0){
      y += 0.5 ;
    }
    else if(y < 0){
      y -= 0.5 ;
    }
    y =(double)((int)(y))/1000 ;
    cout << fixed << setprecision(3) << x << " " << y << endl;
  }
  return 0;
}

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

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

using namespace std;

int main()
{
    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=(a*f-c*d)/(a*e-b*d);

        if(fabs(x)<0.001) x=0;
        if(fabs(y)<0.001) y=0;

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

    return 0;
}

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

int main(){

    double a,b,c,d,e,f,y,x,bb,cc,dd,ee,ff;
    while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF){
        y=(c*d-a*f)/(b*d-a*e);
        x=(c-b*y)/a;
        x+=0.0004;
        y+=0.0004;
        printf("%.3lf %.3lf\n",x,y);
    
        /*
        y=round(1000*y);
        y=(int)y;
        y=y/1000+0.0;
        
        x=round(1000*x);
        x=(int)x;
        x=x/1000+0.0;
        cout<<fixed<<setprecision( 3 )<<x<<" "<<y<<endl;*/
        //printf("%f %f\n",x,y);
    }
    return 0;
}

C++: #include <iostream>
#include <string>   
using namespace std;
 
int main(){
	double a,b,c,d,e,f,aa,bb,cc,i = 0,x,y;
	cin >> a >> b >> c >> d >> e >> f;
	aa = a;
	bb = b;
	cc = c;
	a = a * d;
	b = b * d;
	c = c * d;

	d = d * aa;
	e = e * aa;
	f = f * aa;

	y = (c - f) / (b - e);
	x = cc - (bb * y);
	x = x / aa;
	cout << x << " " << y << endl;

}

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

int main(){

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

	double x,y;

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

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

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

	}

	return 0;
}

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

int main(){

  int a,b,c,d,e,f;
  double x,y;
  
  while(cin>>a>>b>>c>>d>>e>>f){

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

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

}

C++: #include <cstdio>
#include <iostream>
#include <iomanip>
#include <string>   
using namespace std;
 
int main(){
	double a,b,c,d,e,f,aa,bb,cc,i = 0,x,y;
	cin >> a >> b >> c >> d >> e >> f;
	aa = a;
	bb = b;
	cc = c;
	a = a * d;
	b = b * d;
	c = c * d;

	d = d * aa;
	e = e * aa;
	f = f * aa;

	y = (c - f) / (b - e);
	x = cc - (bb * y);
	x = x / aa;
    cout << fixed << setprecision(3) << x << " " << fixed << setprecision(3) << y << endl;
}

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

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

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

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

	return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <queue>
#include <stdio.h>
using namespace std;

int main() {
    clock_t cTimeStart, cTimeEnd;
    cTimeStart = clock();           // 現在時刻
    float a,b,c,d,e,f ;
    float x,y;
    while(cin>>a>>b>>c>>d>>e>>f){
    	x=(f*b-e*c)/(b*d-e*a);
       	y=(f*a-d*c)/(e*a-b*d);
       	printf("%8.3f %8.3f\n",x,y);
    }

    cTimeEnd = clock();           // 現在時刻
//    cout<< "処理時間:" <<(cTimeEnd - cTimeStart)/1000 << "[ms]" << endl;

	return 0;
}

C++: #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define MOD 1000000007 //10^9+7
#define INF 1000000000 //10^9

pair<double, double>equ2(int a,int b,int c,int d,int e,int f){
    double det=1.0/(a*e-b*d);
    double x=(double)(c*e-b*f)*det;
    double y=(double)(a*f-c*d)*det;
    if (x==-0) x=0;if (y==-0) y=0;
    return pair<double, double>(x,y);
}

int main ()
{
    string str;
    while (!cin.eof()) {
        int a,b,c,d,e,f;
        
        cin>>a>>b>>c>>d>>e>>f;
        
        pair<double,double> ans=equ2(a,b,c,d,e,f);
        
        printf("%.4f %.4f\n",ans.first,ans.second);
    }
    return 0;
}

C++: #define _USE_MATH_DEFINES
#include <iostream> 
#include <iomanip>
#include <string>
#include <map>
#include <math.h>
#include <vector>
#include <algorithm>
using namespace std; 
int main(){
	double a, b, c, d, e, f, x, y;
	while(cin >> a >> b >> c >> d >> e >> f){
		x = (c*e - f*b) / (a*e - d*b);
		y = (c*d - f*a) / (b*d - e*a);
		if (x==0){ x=0; }
		if (y==0){ y=0; } 
		std::cout << std::fixed;
		std::cout << std::setprecision(3) << x << " " << y << endl;
	}
	return 0;
}

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

int main() {
	double a, b, c, d, e, f, xx, yy;
	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;
}