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

}

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


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

}

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

    double a,b,c,d,e,f,x,y;
    
    scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f);
    
	x=(c*e-b*f)/(a*e-b*d);
	y=(c*d-a*f)/(b*d-a*e);
	
	printf("%.3f%.3f",x,y);
	
        
	return 0;
}

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

int main(){
	float x, y;
	int a, b, c, d, e, f, p[4], q[4];
	while (true){
		cin >> a >> b >> c >> d >> e >> f;
		if (cin.eof()){
			break;
		}
		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{
			x = (c*e - b*f) / (e*a - b*d);
			y = (c - a*x) / b;
		}
		p[0] = x / 1;
		q[0] = y / 1;
		b = x * 10;
		c = y * 10;
		for (int i = 1;i<4;i++){
			p[i] = (b*10) % 10;
			q[i] = (c*10) % 10;
			x = x * 10;
			y = y * 10;
			b = x;
			c = y;
		}
		cout << p[0] << "." << p[1] << p[2] << p[3] << " " << q[0] << "." << q[1] << q[2] << q[3] << endl;
	}
	return 0;
}

C++: 
#include <stdio.h>
int main(void) {
  float a,b,c,d,e,f;
  while(scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f)!=EOF){
    printf("%.3f %.3f\n",((f-e*c/b)/(d-e*a/b)),((f-d*c/a)/(e-d*b/a)));
  }
  return 0;
}

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

int main(){
    double a, b, c, d, e, f;
    double x, y;
    while(cin >> a >> b >> c>>d>>e>>f){
        y = (a*f-d*c)/(a*e-b*d);
        x = (c-b*y)/a;
        printf("%9f %9f\n", x, y);
    }
}

C++: #include <bits/stdc++.h>
#define int long long
#define ll long long
#define rep(i,n) for(int i=0;i<n;i++)
#define INF (((ll)1<<31)-1)
#define eps LDBL_EPSILON
#define moder (1000000007)
#define pie 3.141592653589793238462643383279
#define P std::pair<int,int>
#define prique priority_queue
#define ggr getchar();getchar();return 0;
using namespace std;
double a,b,c,d,e,f;
signed main(){
    while(cin>>a>>b>>c>>d>>e>>f){
        double ans1=(c*e-b*f)/(a*e-b*d),ans2=(c*d-a*f)/(b*d-a*e);
        if(c*e==b*f)ans1=0;
        if(c*d==a*f)ans2=0;
        if((int)(ans1*10000)%10>=5)ans1=(int)(ans1*1000)+1;
        else ans1=(int)(ans1*1000);
        if((int)(ans2*10000)%10>=5)ans2=(int)(ans2*1000)+1;
        else ans2=(int)(ans2*1000);
        printf("%.3lf %.3lf\n",ans1/1000,ans2/1000);
    }
    ggr;
}

C++: #include <stdio.h>
#include <iostream>

using namespace std;

int main(int argc, char* argv[])
{
	double a, b, c, d, e, f;
	double b1, c1, e1, f1;
	double x, y;

	while (cin >> a >> b >> c >> d >> e >> f) {
		b1 = b * d;
		c1 = c * d;
		e1 = e * a;
		f1 = f * a;

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

C++: #include <iostream>
#include<string>
#include<cmath>
#include<algorithm>
#include<cctype>
#include<queue>
#include<stack>
#include<stdio.h>
#include<vector>
#include<set>
#include<map>
#include<iomanip>
#define rep(i,n) for(int i=0;i<n;i++)
typedef int long long ll;

using namespace std;
int main(){

    double a,b,c,d,e,f;
    
    while(cin>>a>>b>>c>>d>>e>>f){
        
        double h=a*e-b*d;
        double xx=(c*e-f*b);
        double yy=(a*f-c*d);
        
        double x=xx/h;
        double y=yy/h;
        printf("%.3f %.3f \n",x,y);
        
    }
return 0;
}

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

int main(void){
	double a,b,c,d,e,f;
	double x,y;
	cout << fixed;
	cout.precision(3);
	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);
		if(x==0) x=0.0;
		if(y==0) y=0;
		cout << x << " " << y << endl;
	}
	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){
        bb=b/a;
        cc=c/a;
        ee=e/d;
        ff=f/d;
        y=(cc-ff)/(bb-ee);
        x=(c-b*y)/a;
        //y=123.45678;
        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 <iomanip>
using namespace std;

int main(){
  double a, b, c, d, e, f;
  cout << fixed;
  cout << setprecision(3);

  while(cin >> a >> b >> c >> d >> e >> f){
    if(c*e == b*f)
      cout << 0.000 << " ";
    else
      cout << (c*e -b*f)/(a*e - b*d) << " ";
    if(c*d == a*f)
      cout << 0.000 << " ";
    else
      cout << (c*d - a*f)/(b*d - a*e) << endl;
  }

  cout << d << " " << e << endl;
  return 0;
}

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

double ans(double a,double b,double c,double d,double e,double f){
    double y1=b*d;
    double a1=c*d;
    double y2=e*a;
    double a2=f*a;
    double y=y1-y2;
    double a3=a1-a2;
    return a3/y;
}

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

    cout<<fixed<<setprecision(3)<<ans(b,a,c,e,d,f)<<' '<<setprecision(3)<<ans(a,b,c,d,e,f)<<endl;
}

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

double det(double a, double b, double c, double d){
	return a*d - b*c ;
}

int main() {
	// your code goes here
	
	double a,b,c,d,e,f;
	double x,y;
	while(cin>>a>>b>>c>>d>>e>>f){
		x=det(c,b,f,e)/det(a,b,d,e);
		y=det(a,c,d,f)/det(a,b,d,e);

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

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;
	while(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;
	}
}