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<cmath>
#include<iomanip>
double pow(double x,double y);
using namespace std;
int main(){
  double a,b,c,d,e,f,x,y,g,z,aa,bb;
  while(cin>>a){
    cin>>b>>c>>d>>e>>f;
    g=b;
    z=c;
    c*=d;
    cout<<c<<' '<<1<<endl;
    b*=d;
    cout<<b<<' '<<2<<endl;
    e*=a;
    cout<<e<<' '<<3<<endl;
    f*=a;
    cout<<f<<' '<<4<<endl;
    b-=e;
    cout<<b<<' '<<5<<endl;
    c-=f;
    cout<<c<<' '<<6<<endl;
    y=c/b;
    cout<<y<<' '<<7<<endl;
    g*=y;
    cout<<g<<' '<<8<<endl;
    z-=g;
    cout<<z<<' '<<9<<endl;
    x=z/a;
    cout<<x<<' '<<10<<endl;
    aa=round(x);
    bb=round(y);
    cout<<fixed;
    cout<<setprecision(3)<<aa<<' '<<setprecision(3)<<bb<<' '<<11<<endl;
  }
  return(0);
}

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

int main(){
    int 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;
        int tmp = x*1000;
        x = tmp / 1000;
        tmp = y* 1000;
        y = tmp / 1000;
        cout<<x<<" "<<y<<endl;
    }
    return 0;
}

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

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

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

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

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

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

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

	return 0;
}

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

C++: #include<iostream>

#include<stdio.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 - e * c) / (b*d - a * e);

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

       x = int(1000 * x + 2 * (1000 * x - int(1000 * x))) / 1000.0;

       y = int(1000 * y + 2 * (1000 * y - int(1000 * y))) / 1000.0;

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

   }

}

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 mat = a * e - b * d;
		double dx = (c * e - b * f) / mat;
		double dy = (a * f - d * c) / mat;

		if (dx == -0.) dx = 0.;
		if (dy == -0.) dy = 0.;
		printf("%.3f %.3f\n", dx, dy);
	}
	return 0;
}

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

double is(double n)
{
	double mammad=n*1000;
	int mammadd=(int)mammad;
	return (double)mammadd / 1000.00;
}

int main()
{
	double a,b,c,d,e,f;
		
	while (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;
		cout<<setprecision(3)<<fixed<<is(x)<<" "<<setprecision(3)<<fixed<<is(y)<<endl;
	
	}
}

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

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)
{

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

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

C++: #include <stdio.h>

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

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

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

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 - a*x) / b;

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

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

using namespace std;
double round(double value);

int main(){
  double a,b,c,d,e,f;
  vector<double> al,bl,cl,dl,el,fl;
  double x,y,n,m;

  while(cin >> a >> b >> c >> d >> e >> f){
    al.push_back(a);
    bl.push_back(b);
    cl.push_back(c);
    dl.push_back(d);
    el.push_back(e);
    fl.push_back(f);
  }

  for(int i=0; i<al.size(); i++){
    n = bl[i]/el[i];
    m = al[i]/dl[i];
    x = (cl[i]-n*fl[i])/(al[i]-n*dl[i]); 
    y = (cl[i]-m*fl[i])/(bl[i]-m*el[i]);
    cout << setprecision(3) << fixed << round(x) << " " << round(y) << endl;
  }

  return 0;
}


double round(double value){
  return floor(value*1000 + 0.5)/1000;
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <set>
#include <vector>
#include <cstring>
#include <climits>
#include <queue>
using namespace std;

#define REP(i,a,n) for(int i=(a); i<(int)(n); i++)
#define rep(i,n) REP(i,0,n)
#define EPS 1e-9

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