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 <iomanip>
#include <string>
#include <vector>
#include <sstream>

using namespace std;

using DataSet = vector<double>;

//void debug(const string& prefix, const DataSet& data);

void readInputData(vector<string>& input_data){
    string buff;
    while(getline(cin, buff)){
        input_data.push_back(buff);
    }
}

void _parseString(const string& input_data, DataSet& data_set) {
    data_set.resize(6);

    stringstream ss;
    ss << input_data;
    ss >> data_set[0] >> data_set[1] >> data_set[2]
        >> data_set[3] >> data_set[4] >> data_set[5];
}

void parseString(const vector<string>& input_data, vector<DataSet>& data_set) {
    data_set.resize(input_data.size());
    for(int i = 0; i < input_data.size(); ++i) {
        DataSet buff;
        _parseString(input_data[i], buff);
        data_set[i] = buff;
    }
}

double determinant2d(const DataSet& data){
    return data[0] * data[4] - data[1] * data[3];
}

void inverse2d(DataSet& data){
    double t = data[0];
    data[0] = data[4];
    data[4] = t;

    data[1] = -data[1];
    data[3] = -data[3];
}


void calculateXY(const DataSet& data, double det, vector<double>& result){
    result.resize(2);

    result[0] = (data[0] * data[2] + data[1] * data[5]) / det;
    result[1] = (data[3] * data[2] + data[4] * data[5]) / det;
}

void solve(vector<DataSet>& data_set){
    cout << fixed;
    cout << setprecision(3);

    for(int i = 0; i < data_set.size(); ++i){
        vector<double> buff;

        double det = determinant2d(data_set[i]);

        inverse2d(data_set[i]);
        //debug("inverse", data_set[i]);

        calculateXY(data_set[i], det, buff);
        //debug("calculate", data_set[i]);

        cout << buff[0] << " " << buff[1] << endl;
    }
}

//void debug(const string& prefix, const DataSet& data){
//
//
//    cout << prefix << endl;
//
//    cout << "Matrix:" << endl;
//    cout << data[0] << "  " << data[1] << endl;
//    cout << data[3] << "  " << data[4] << endl;
//
//    cout << "\nx_y:\n";
//    cout << data[2] << "\n" << data[5] << "\n";
//
//    cout << "\ndet: " << determinant2d(data) << endl;
//}



void doAllProcess(){
    vector<string> input_data;
    readInputData(input_data);

    vector<DataSet> data_set;
    parseString(input_data, data_set);

    solve(data_set);
}

//
//void test(){
//    vector<string> input_data;
//    input_data.push_back("1 2 3 4 5 6");
//    input_data.push_back("2 -1 -2 -1 -1 -5");
//    input_data.push_back("2 -1 -3 1 -1 -3");
//    input_data.push_back("2 -1 -3 -9 9 27");
//
//    vector<DataSet> data_set;
//    parseString(input_data, data_set);
//
//    solve(data_set);
//
//    getchar();
//}

int main(){
    doAllProcess();
    //test();
    return 0;
}

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

void SolveAndShowEquation(double a,double b,double c,double d,double e,double f);
double Roundoff(double x);
int main(){
  double a,b,c,d,e,f;
  while(cin>>a>>b>>c>>d>>e>>f){
    SolveAndShowEquation(a,b,c,d,e,f);
  }
  return 0;
}

void SolveAndShowEquation(double a,double b,double c,double d,double e,double f){
  double x,y,delta;
  delta=a*e-b*d;
  x=(c*e-b*f)/delta;
  y=(a*f-c*d)/delta;
  x=Roundoff(x);
  y=Roundoff(y);
  cout<<fixed<<setprecision(3)<<x<<" "<<setprecision(3)<<y<<endl;
}

double Roundoff(double x){
  if( x<0 ){
    x*=-1;
    x=double(int(x*1000))/1000+((((x*1000)-int(x*1000))*10)>=5?0.001:0);
    x*=-1;
  }else{
    x=double(int(x*1000))/1000+((((x*1000)-int(x*1000))*10)>=5?0.001:0);
  }
  return x;
}

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

C++: #include <iostream>
#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 = (double)(c*e-b*f) / (a*e-b*d);
    y = (double)(f-d*x) / e;

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

  }


  return 0;
}

C++: #include<stdio.h>

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){
    if(a*e == b*d){
      printf("This equiation has no real number solution");
      break;
    }
    x = (e * c + (-1)*b*f)/(a*e-b*d);
    y = ((-1)*d*c + a * f)/(a * e - b* d);
    printf("%f %f\n",x,y);
  }
  return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <iomanip>
#include <math.h>
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 = (c * d - a * f) / (b * d - e * a);
		y = (c - (b * y)) / a;

		cout<<setiosflags(ios::fixed)<<x<<" "<<y<<endl;
	}

	return 0;
}

C++: #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){
        x = (b*f-c*e)/(b*d-a*e);
        y = (a*f-c*d)/(a*e-b*d);
        cout<<fixed<<setprecision(3)<<x<<' '<<y<<endl;
    }
    return 0;
}

C++: #include <stdio.h>

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

C++: #include <iostream>
#include <math.h>
using namespace std;
int main() {
	long double a, b, c, d, e, f, x, y;
	while (cin >> a >> b >> c >> d >> e >> f) {
		x = (long double)(b*f - e * c) / (d*b - a * e);
		y = (long double)(a*f - d * c) / (a*e - d * b);
		if (x < 0)
			x = (long double)((int)(x * 1000 - 0.5)) / 1000;
		else
			x = (long double)((int)(x * 1000 + 0.5)) / 1000;
		if (y < 0)
			y = (long double)((int)(y * 1000 - 0.5)) / 1000;
		else
			y = (long double)((int)(y * 1000 + 0.5)) / 1000;
		printf("%.3llf %.3llf\n", x, y);
	}
	return 0;
}

C++: #include <stdio.h>
float round3(float a){
	a=a*10000;
	if(int(a)%10>5)a+10;
	a=double (int (a));
	a=a/10000;

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

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

C++: #include<stdio.h>

int main(void){
	double x=0,y=0;
	double a=0,b=0,c=0,d=0,e=0,f=0,i=0,j;
    
    while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f) != EOF)
	{
		y = ( c * d - a * f ) / ( b * d - e * a );

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

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