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.Println(".000")
		fmt.Print(y)
		fmt.Println(".000")
	}
}

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

using namespace std;

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

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

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

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

int main(void) {
    int a, b, c, d, e, f;
    float x, y;
    float det;
    while(cin >> a >> b >> c >> d >> e >> f) {
        det = a * e - b * d;
        x = (float)(e * c - b * f) / det;
        y = (float)(-d * c + a * f) / det;
        x = roundf(1000 * x) / 1000.0;
        y = roundf(1000 * y) / 1000.0;
        if(x == -0)
            x = 0.0;
        if(y == -0)
            y = 0.0;
        printf("%f %f\n", x, y);
    }
}

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

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

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

C++: #include <iostream>
#include <stdio.h>
#include <cmath>
#define EPS 1e-10
using namespace std;
int main(){
  double a,b,c,d,e,f;

  while(1){
    cin >> a >> b >> c >> d >> e >> f;
    if(cin.eof())break;

    double x = (f*b-c*e)/(b*d-a*e);
    double y = (c - a*x)/b;
    if(abs(x) < EPS)x = 0;
    if(abs(y) < EPS)y = 0;
    printf("%.3f %.3f\n",x,y);
  }
}

C++: #include <stdio.h>

int main (void){
	int a, b, c, d, e, f;
	double ans[2];
	while(scanf("%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f)!=EOF){
		ans[0]=(double)(b*f-c*e)/(d*b-a*e);
		ans[1]=(double)(c*d-a*f)/(b*d-a*e);
		printf("%.3lf, %.3lf\n", ans[0], ans[1]);
	}
	return 0;
}

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

double round(double x, int k) {
  double res = x * pow(10, k) + 0.5;
  res = (double)(int)res;
  res = res * pow(0.1, k);
  return res;
}

int main() {
  double a, b, c, d, e, f;
  while (cin >> a >> b >> c >> d >> e >> f) {
    double det = a*e - b*d;
    double x = (e * c - b * f)/det;
    double y = (-1*d * c + a * f)/det;
    cout << fixed << setprecision(3) << round(x, 4) 
	 << " " << round(y, 4) << endl;
  }
}

C++: 
#include<stdio.h>

int main (void){

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

    double X,Y;

    scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f);

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

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

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


    return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <queue>
#include <bitset>
#include <set>
#include <map>
#include <stack>
#include <list>
#include <iomanip>

#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,b,n) for(int i=b;i<n;i++)
#define SORT(c) sort((c).begin(),(c).end())
#define DESCSORT(c) sort(c.begin(), c.end(), greater<int>())

const float PI = 3.1415926;
static const int INFTY = (1<<30);

using namespace std;

typedef long long ll;
typedef long double ld;

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

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

C++: #include<stdio.h>
int main(){
	int a,b,c,d,e,f;
	double x,y;
	scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f);
	x=(double)(c*e-b*f)/(a*e-b*d);
	y=(double)(c*d-a*f)/(b*d-a*e);
	if(x>0){
		x=x+0.0005;
	}
	else{
		x=x-0.0005;
	}
	if(y>0){
		y=y+0.0005;
	}
	else{
		y=y-0.0005;
	}
	printf("%.3lf %.3lf\n",x,y);
	scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f);
	x=(double)(c*e-b*f)/(a*e-b*d);
	y=(double)(c*d-a*f)/(b*d-a*e);
	if(x>0){
		x=x+0.0005;
	}
	else{
		x=x-0.0005;
	}
	if(y>0){
		y=y+0.0005;
	}
	else{
		y=y-0.0005;
	}
	printf("%.3lf %.3lf\n",x,y);
}

C++: #include <stdio.h>
#include <stdlib.h>
#include <math.h>

#define EPS 1e-12

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

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

#include <iostream>
#include <vector>
#include <algorithm>

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

  for(;;) {
    std::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);

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

    if( std::cin.eof() ) {
      break;
    }
  }

  return 0;
}

C++: #include <stdio.h>

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

	for(;scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f) == 6;){
		y = (c*d-f*a) / (b*d-e*a);
		x = (f-e*y) / d;
		printf("%.3f %.3f\n",x+0.0,y+0.0);
	}

	return 0;
}

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

using namespace std;

int main(){
	cout << setprecision(3) << setiosflags(ios::fixed);
	while(1){
	double a, b, c, d, e, f;
	cin >> a >> b >> c >> d >> e >> f;

	cout << (c*e-f*b)/(a*e-d*b) << " " << (c*d-f*a)/(b*d-a*e) << '\n';

	}
	return 0;
}

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

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

C++: #include <vector>
#include <iostream>
#include <set>
#include <cstdio>
#include <queue>
#include <cstdio>
#include <cstdlib>
#include <cassert>
#include <ctime>
#include <algorithm>
#include <tuple>
#include <algorithm>
#include <limits>
#include <map>

using namespace std;

typedef long long ll;
typedef pair<int, int> P;
typedef tuple<int, int, int> T;

int main() {
    int a, b, c, d, e, f;
    while (cin >> a >> b >> c >> d >> e >> f) {
        double det = a*e-b*d;
        double r1 = (e*c-b*f)/det;
        double r2 = (-d*c+a*f)/det;
        printf("%.20f %.20f\n", r1, r2);
    }
    return 0;
}