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

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

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

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

using namespace std;

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

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

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

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

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

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

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

	return 0;
}

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

int main(void){
	double x1,y1;
	int a=0,b=0,c=0,d=0,e=0,f=0,x2,y2;
    
    while(scanf("%d %d %d %d %d %d\n",&a,&b,&c,&d,&e,&f) != EOF)
	{
	    x2 = (c * e -b * f) / (a * e - b * d)*1000+0.5;
	    y2 = (a * f -d * c) / (a * e - b * d)*1000+0.5;

		x1 = x2/1000;
		y1 = y2/1000;
		printf("%lf %lf\n",x1,y1);
	}
  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 = (c*e-b*f) / (a*e-b*d);
    y = (f-d*x) / e;

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

  }


  return 0;
}

C++: #include<iostream>
#include<iomanip>
#include<cstdio>
#include<vector>
#include<algorithm>
#include<cmath>
#include<queue>
#include<stack>
#include<functional>
#include<string>
#include<cstring>
#include <sstream>
using namespace std;
int main(void){
    double a,b,c,d,e,f,x,y;
    while(cin >> a >> b >> c >> d >> e >> f){
        double ad = a / d;
        d *= ad;
        e *= ad;
        f *= ad;
        d -= a;
        e -= b;
        f -= c;
        y = f/e;
        x = (c - b * y)/a;
        y *= 1000;
        y = round(y);
        y /= 1000;
        x *= 1000;
        x = round(x);
        x /= 1000;
        cout << fixed << std::setprecision(3) << x << " " << fixed << std::setprecision(3) << y << endl;
    }
    return 0;
}

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

using namespace std;

using DataSet = vector<double>;


void readInputData(vector<string>& input_data){
    string buff;
    while(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 << setprecision(3);

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

        double det = determinant2d(data_set[i]);

        inverse2d(data_set[i]);

        calculateXY(data_set[i], det, buff);

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


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

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

    solve(data_set);
}



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

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

using namespace std;

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

C++: #include<iostream>
#include<iomanip>
#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=(c*e-b*f)/(a*e-b*d);
		y=(c*d-a*f)/(b*d-a*e);
		if(abs(x)<0.0001) x=0.0000;
		if(abs(y)<0.0001) y=0.0000;
		cout<<fixed<<setprecision(3)
		    <<x<<" "<<y<<endl;
	}
}

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

 int main() {

	 double a;
	 double b;
	 double c;
	 double d;
	 double e;
	 double f;
	 double x;
	 double y;

	 while (std::cin >> a >> b >> c >> d >> e >> f) {

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

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



}

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

int main()
{
	double a, b, c, d, e, f;
	while(cin>>a>>b>>c>>d>>e>>f){     
	  cout<<fixed<<setprecision(4);
	  cout <<(e*c - b*f) / (a*e - b*d) << " " << (a*f - d*c) / (a*e - b*d) << endl;
	}
cout<<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 = (c * e - b * f) / (a * e - b * d);
    y = (a * f - c * d) / (a * e - b * d);
    printf("%.3f %.3f\n", x, y);

  }
}

C++: #include <cstdio>
#include <iostream>
#include <sstream>
#include <string>
#include <cmath>
#include <vector>
#include <deque>
#include <queue>
#include <map>
#include <algorithm>
#include <functional>

using namespace std;

int main(void)
{
    string str;
    double a, b, c, d, e, f;
    while(cin >> a >> b >> c >> d >> e >> f){
        double delta = a * e - b * d;
        double x = 1.0 / delta * (c * e - b * f);
        double y = 1.0 / delta * (-d * c + a * f);
        printf("%.3f %.3f\n", x, y);
    }
    
    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*(b*d-a*e)-b*(c*d-a*f))/(a*(b*d-a*e));
		y=(c*d-a*f)/(b*d-a*e);
		cout<<setiosflags(ios::showpoint)<<setprecision(4)<<x<<" "<<y<<endl;
	}
	return 0;
}