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>

int main(void){
	int i,j,k;	//sñ\¦
	double p,d,a[5][5]={0};			//p=s|bgAd=XC[vìÏ
	
	
	while(scanf("%lf %lf %lf %lf %lf %lf",&a[0][0],&a[0][1],&a[0][2],&a[1][0],&a[1][1],&a[1][2])!=EOF)
	{		
	
		//printf("%fx+%fy=%f\n",a[0][0],a[0][1],a[0][2]);		mF
		//printf("%fx+%fy=%f\n",a[1][0],a[1][1],a[1][2]);
	
	
		for(k=0;k<2;k++){
			/* s{bgXC[vìÅWðÎp»:s{bgW */
			p=a[k][k];	
			
			for(j=k;j<(2+1);j++){
				/* s{bgsÌeWðs{bgWÅé*/
				a[k][j]=a[k][j]/p;
			}
			
			for(i=0;i<2;i++){
				/*s{bgñÌXC[vì:s{bgsÅÈ¢êÌÝÀs */
				if (i!=k) {   
					d=a[i][k];
					
					for (j=k;j<2+1;j++){
						a[i][j]= a[i][j]-d*a[k][j];
					}
				
				}
			}
		}	
	
		
		for (k = 0; k < 2; k++){
			printf("%.3f ",a[k][2]);
		}
		
		printf("\n");
	}	
	
	return 0;
}

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

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

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

int main()
{
  double a[10],b[10];
  for(int i=0;i<6;i++)
  {

	  cin>>a[i];
	  if((a[i]>1000)||(a[i]<-1000)){
	    cout << "nomber error" <<endl;
	    return 0;
     }
  }
  for(int i=0;i<6;i++)
  {

	  cin>>b[i];
	  if((b[i]>1000)||(b[i]<-1000)){
	    cout << "nomber error" <<endl;
	    return 0;
     }
  }
  cout<<setprecision(4)<<(a[2]*a[4]-a[1]*a[5])/(a[0]*a[4]-a[1]*a[3])<<" ";
  cout<<setprecision(4)<<(a[2]*a[3]-a[0]*a[5])/(a[1]*a[3]-a[0]*a[4])<<" ";
  cout<<setprecision(4)<<(b[2]*b[4]-b[1]*b[5])/(b[0]*b[4]-b[1]*b[3])<<" ";
  cout<<setprecision(4)<<(b[2]*b[3]-b[0]*b[5])/(b[1]*b[3]-b[0]*b[4])<<" ";
  return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <sstream>
#include <vector>
#include <cmath>

using namespace std;

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

	vector<string> v;
	while (cin >> a >> b >> c >> d >> e >> f) {
		double x, y;

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

		if (x == 0) {
			x = 0;
		}
		else if (y == 0) {
			y = 0;
		}

		x = x * 1000;
		x = round(x);
		x = x / 1000;

		y = y * 1000;
		y = round(y);
		y = y / 1000;

		stringstream ss;
		ss << fixed << setprecision(3) << x << " " << y;
		v.push_back(ss.str());
	}
	
	for (int i = 0; i < v.size(); i++) {
		cout << v[i] << endl;
	}

	return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#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=(a*f-c*d)/(a*e-b*d);
    y=(c*e-f*b)/(a*e-b*d);
    printf("%.3lf %.3lf \n",x,y);
  }
}

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

struct vector2{
	float x, y;
	vector2() : x(0), y(0){}
	vector2(float x, float y) : x(x), y(y){}
};

struct sim_elem{
	float a, b, c, d, e, f;
	sim_elem() :a(0), b(0), c(0), d(0), e(0), f(0){}
	sim_elem(float a, float b, float c, float d, float e, float f) :a(0), b(0), c(0), d(0), e(0), f(0){}
};

//	a / d * d
//	ey - by = f - c
//	y / y = (f - c) / y

// ax = -by + c
// ax / a = -(by + c) / a

vector2 sim_equ(sim_elem elem){

	float dx = elem.a / elem.d * elem.d;
	float ey = elem.a / elem.d * elem.e;
	float f = elem.a / elem.d * elem.f;

	float y = ey - elem.b;
	float yr = f - elem.c;
	y = yr / y;

	float ax = -elem.b * y + elem.c;
	float x = ax / elem.a;

	return vector2(x, y);
}

//	sprintf
float placement4(float val){
	char ret[128];
	sprintf_s(ret, "%.3f", val);
	return (float)atof(ret);
}

int main(){

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

		vector2 ret;
		ret = sim_equ(elem);
		printf("%.3f %.3f\n", placement4(ret.x) ,placement4(ret.y) );
	}

	return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(){
	float a,b,c,d,e,f,g,x,y,ans;
	float B,C,E,F,j,k,l;
	while(cin>>a>>b>>c>>d>>e>>f){
		B=b*d;
		C=c*d;
		E=a*e;
		F=a*f;
		j=B-E;
		k=C-F;
		y=k/j;
		x=(c-b*y)/a;
		printf("%.3lf %.3lf\n",x,y);
	}
	return 0;
}

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

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

C++: #include <iostream>
#include <iomanip>
int main()
{
  int a, b, c, d, e, f;
  while (std::cin >> a >> b >> c >> d >> e >> f) {
    double x, y, r;
    r = static_cast<double>(a * e - b * d);
    x = static_cast<double>(c * e - b * f) / r;
    y = static_cast<double>(a * f - c * d) / r;
    if (x * x < 0.0001) x = 0;
    if (y * y < 0.0001) y = 0;
    std::cout << std::fixed << std::setprecision(3) << x << " " << y << std::endl;
  }
  return 0;
}

C++: #include<iostream>
#include<stdio.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 = (double)(c*e - f*b) / (a*e - d*b);
	y = (double)(a*f - d*c) / (a*e - d*b);
 	
 	printf("%.3lf %.3lf\n",x,y);
	}
 return 0;
}

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

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

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

using namespace std;

int main(){
    int a, b, c, d, e, f;
    /***
    |a, b| |x| - |c|
    |d, e| |y| - |f|
     ***/
    while (cin >> a >> b >> c >> d >> e >> f) {
	int p, q, r, s;
	double det = (a*e - b*d);
	p = e;
	q = -b;
	r = -d;
	s = a;

	double x, y;
	x = (p*c + q*f) / det;
	y = (r*c + s*f) / det;
	if (x == 0) {x = 0;}
	if (y == 0) {y = 0;}
	
	printf("%.3lf %.3lf\n", x, y);
    }

    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int a, b, c, d, e, f;
int main() {
	while(cin >> a >> b >> e >> c >> d >> f) {
		double p = d * e - b * f; p /= a * d - b * c; if(-1e-10 < p && p < 1e-10) p = 0.0;
		double q = a * f - c * e; q /= a * d - b * c; if(-1e-10 < q && q < 1e-10) q = 0.0;
		printf("%.3lf %.3lf\n", p, q);
	}
	return 0;
}

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

int main(){
	float a,b,c,d,e,f,x,y;
	while(scanf("%f",&a)){
	scanf("%f%f%f%f%f",&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++: #include <iostream>
#include <iomanip>

using namespace std;

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

	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;
	if(y==0)y=0;

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