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 <stdio.h>
#include <math.h>
int main(){
double a, b, c, d, e, f;
double det;
double x, y;
while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF){
det = a * e - b * d;
if(det != 0){
x = (e * c - b * f) / det;
y = (a * f - d * c) / det;
x = (x == fabs(x)) ? fabs(x) : x;
y = (y == fabs(y)) ? fabs(y) : y;
printf("%.3f %.3f\n", x , y);
}
}
return 0;
}

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

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

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

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

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

int main(){
	float a,b,c,d,e,f,x,y;
	
	scanf("%f%f%f%f%f%f",&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);
	std::cout<<std::endl;
	
	
	return 0;
	
	}

C++: #define _CRT_SECURE_NO_WARNINGS
#define M_PI 3.14159265358979
#include <iostream>
#include <stdio.h>
#include <string>
#include <math.h>
#include<iomanip>
#include<vector>
#include<cmath>
#include <algorithm>

using namespace std;

int main(){
	double a, b, c, d, e, f, x, y, x1, y1;
	while (scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)!=-1)
	{
		y=(f-d*c)/(a*e-b*d);
		x = (c - b*y) / a;
		y1 = round(y * 1000) / 1000;
		x1 = round(x * 1000) / 1000;
		printf("%.3f %.3f\n", x1, y1);

		
	}
	
	return 0;
}

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

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

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

int main(){
    std::cin.tie(0);
    std::ios::sync_with_stdio(false);

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

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

int main(void){
	double a,b,c,d,e,f;
	//int X[2][2]={ {c,b}, {f,e} };
	//int Y[2][2]={ {a,c}, {d,f} };
	double x,y;
	double A,X,Y;
	while(cin>>a>>b>>c>>d>>e>>f){
		A=a*e-b*d;
		X=c*e-b*f;
		Y=a*f-c*d;
		x=(1/A)*X;
		y=(1/A)*Y;
	}
	cout << fixed << setprecision(3) << x << ' ' << y << endl;

	return 0;
}

C++: #include<stdio.h>
#include<iostream>
#include<math.h>
using namespace std;
int main(){
    int n;
    cin >> n;
    for(int i=0;i<n;i++){
        double x1,y1,x2,y2,x3,y3;
        cin >> x1 >>y1 >>x2 >> y2 >> x3 >> y3;
        double a1,a2,b1,b2,c1,c2,x,y,r;
         a1=2*(x2-x1);
         b1=2*(y2-y1);
         c1=x1*x1-x2*x2+y1*y1-y2*y2;
         a2=2*(x3-x2);
         b2=2*(y3-y2);
         c2=x2*x2-x3*x3+y2*y2-y3*y3;
         x=(b1*c2-b2*c1)/(a1*b2-a2*b1);
         y=(c1*a2-c2*a1)/(a1*b2-a2*b1);
         r=hypot(x-x1,y-y1);
        printf("%.3lf %.3lf %.3lf\n",x,y,r);
    }
}

C++: #include<iostream>
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<iostream>
#include<math.h>
#include<algorithm>
#include<string.h>
using namespace std;
int main(){
    double a,b,c,d,e,f,x,y;
    cin>>a>>b>>c>>d>>e>>f;
    x=(e*c-f*b)/(a*e-b*d);
    y=(-(d*c)+a*f)/(a*e-b*d);
    if(x==0){
        x=0;
    }
    if(y==0){
        y=0;
    }
    printf("%.3f %.3f\n",x,y);
    return 0;
}

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

int main(){
  int i = 0;
  int a, b, c, d, e, f;

  while(scanf("%d", &a)!=EOF){
  i++;
  scanf("%d ",&b);
  scanf("%d ",&c);
  scanf("%d ",&d);
  scanf("%d ",&e);
  scanf("%d ",&f);
  
  double x, y;
  x = (double)(c*e-b*f) / (double)(a*e-b*d);
  y = (double)(a*f-c*d) / (double)(a*e-b*d);
  x = (double)round(x*10000.0) / 10000.0;
  y = (double)round(y*10000.0) / 10000.0;
  printf("%.3f %.3f\n", x, y);
  
  long line = ftell(stdin);
  if(scanf("%d", &a)==EOF) break;
  
  return 0;
}

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

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

C++: #include<stdio.h>
int main(void){
  float a,b,c,d,e,f,x,y;
  int j=0,i=0;
  float n[2][1000];
  while(scanf("%f %f %f %f %f %f",&a, &b, &e, &c, &d, &f)!=EOF){
    if(a*d-b*c!=0){
      //  printf(" %f %f %f %f %f %f %f\n",a,b,e,c,d,f,((d*e-b*f)/(a*d-b*c)));
      x=((d*e-b*f)/(a*d-b*c));
      y=((a*f-c*e)/(a*d-b*c));
      n[0][i]=x;
      n[1][i]=y;
      //printf(" %.3f %.3f %d\n",x,y);
      //printf(" %.3f %.3f %d\n",n[0][i],n[1][i],i);
     i++;}}
 
  while(j<i){
    printf(" %.3f %.3f %d\n",n[0][j],n[1][j],j);
    j++;  
}



  return 0;
}

C++: #include <cstdio>
#include <iostream>
double sol[10000][2];
int main()
{
    double a, b, e, c, d, f;
    int i = 0;
    while (std::cin >> a >> b >> e >> c >> d >> f)
    {
        double det = a * d - b * c;
 
        double aa = d / det, bb = -b / det, cc = -c / det, dd = a / det;
        sol[i][0] = aa * e + bb * f;
        sol[i][1] = cc * e + dd * f;
 
        i++;
    }
    for (int j = 0; j < i; j++)
        printf("%.3f %.3f\n", sol[j][0], sol[j][1]);
    return 0;
}

C++: #include<algorithm>
#include<functional>
#include<cmath>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<string>
#include<sstream>
#include<iostream>
#include<iomanip>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<map>
#include<set>
#include<bitset>

#define all(c) (c).begin(), (c).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define pb(e) push_back(e)
#define mp(a, b) make_pair(a, b)
#define fr first
#define sc second

typedef unsigned long long ull;
typedef long long ll;

const int INF=100000000;
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};

using namespace std;

typedef pair<int ,int > P;

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


int main()
{

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

		double x=(c-b*y)/a;
		/*
		if(x==0.0)
			x=0.0;
		if(y==0.0)
			y=0.0;
			*/
		printf("%.3lf %.3lf\n",x,y);

	}
	


	return 0;
}