Go: package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Split(bufio.ScanWords)
	for {
		data := nextInts(6)
		fmt.Printf("%.3f\n", Round(GetX(data[0], data[1], data[2], data[3], data[4], data[5]), 3))
		fmt.Printf("%.3f\n", Round(GetY(data[0], data[1], data[2], data[3], data[4], data[5]), 3))
	}
}

func GetX(a, b, c, d, e, f float64) float64 {
	return ((c * e) - (b * f)) / ((a * e) - (b * d))
}

func GetY(a, b, c, d, e, f float64) float64 {
	return ((c * d) - (a * f)) / ((b * d) - (a * e))
}

func Round(f float64, places int) float64 {
	shift := math.Pow(10, float64(places))
	return math.Floor(f*shift+.5) / shift
}

func next() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() float64 {
	a, _ := strconv.Atoi(next())
	return float64(a)
}

func nextInts(n int) []float64 {
	a := make([]float64, n)
	for i := 0; i < n; i++ {
		a[i] = nextInt()
	}
	return a
}

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

int main(){

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

	double x,y;

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

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

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

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
#define REP(i,N) for(int i = 0; i < (int)N; i++)

double det(double a1,double a2,double a3,double a4){
	return a1*a4-a2*a3;
}

int main(){
	double a,b,c,d,e,f;
	while(cin >> a >> b >> c >> d >> e >> f){
		double g,h,i;
		g = det(a,b,d,e);
		h = det(c,b,f,e);
		i = det(a,c,d,f);
		double j,k;
		j = h/g;
		k = i/g;
		j = round(j*pow(10,4))/pow(10,4);
		k = round(k*pow(10,4))/pow(10,4);
		printf("%.3f %.3f\n",j,k);
	}
	return 0;
}

C++: #include <cstdio>
using namespace std;
int main()
{
    int a, b, c, d, e, f;
    while (scanf("%d%d%d%d%d%d", &a,&b,&c,&d,&e,&f) != EOF) {
        double x, y;
        if (a * f != c * d && b * f == c * e) {
            x = 0;
            y = (double)c / b;
        }
        else if (a * f == c * d && b * f != c * e) {
            x = (double)c / a;
            y = 0;
        }
        else {
            x = ((double)a*e-b*d)/(c*e-b*f);
            y = ((double)c*d-a*f)/(b*d-e*a);
        }
        printf("%.3f %.3f\n", x, y);
    }
    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)
	{
		-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);
		if(x == -0.00){x=0.00;}
		if(y == -0.00){y=0.00;}
		cout<<setprecision(3)<<fixed;
		cout<<x<<" "<<y<<endl;
	}
	return 0;
}

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

template <typename T> double round(const T r, const int n = 0){
    if(r>=0){
        return floor(r + 5 * pow(10, n));
    }
    else{
        return ceil(r - 5 * pow(10, n));
    }
}

int main(){
    double a, b, c, d, e, f;
	while(std::cin >> a){
		std::cin >> b >> c >> d >> e >> f;
		std::cout << std::fixed << std::setprecision(3)
			<< round((c * e - b * f) / (a * e - b * d), -3) << ' '
			<< round((a * f - c * d) / (a * e - b * d), -3) << std::endl;
	}
	return 0;
}

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

int main()
{
	std::vector<double> x, y;
	double a, b, c, d, p, q;
	while (scanf("%d %d %d %d %d %d", &a, &b, &p, &c, &d, &q) != EOF)
	{
		x.push_back((d*p - b*q) / (a*d - b*c));
		y.push_back((a*q - c*p) / (a*d - b*c));
	}
	
	for (int i = 0; i < x.size(); ++i)
		std::cout << roundf(x[i]+0.0005) << " " << roundf(y[i]+ 0.0005) << std::endl;
	return 0;
}

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

struct xy
{
	double x;
	double y;
};
int main()
{
	double a, b, c, d, e, f,x,y;
	vector<xy> dst;
	while (cin>> a >> b >> c >> d >> e >> f) {
		y = (f - d / a * c) / (e - d / a * b);
		x = (c - b * y) / a;
		dst.push_back({ x,y });
	}
	for (vector<xy>::iterator it = dst.begin(); it < dst.end(); it++) {
		cout.setf(ios::fixed);
		cout << fixed << setprecision(3) << (*it).x<<" "<<(*it).y << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <iomanip>
using namespace std;
int main(void){
    // Here your code !
    double a, b, c, d, e, f;
    while (cin >> a >> b >> c >> d >> e >> f) {
        double x = (c * e - b * f) / (a * e - b * d);
        double y = (a * f - c * d) / (a * e - b * d);
        x *= 1000; x = x + (x > 0 ? 0.5 : -0.5); x = (int)x;
        y *= 1000; y = y + (y > 0 ? 0.5 : -0.5); y = (int)y;
        //cout << %.3f %.3f\n << x / 1000 << y / 1000 << endl;
        cout << fixed << setprecision(3) << x /1000 << " " << y / 1000 <<endl;
    }
    return 0;
}

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

using namespace std;


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

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

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

C++: #include <iostream>
#include <cstdio>
using namespace std;
int main(void){
     
    double x, y;
    int a, b, p;
    int c, d, q;
 
    while (cin >> a >> b >> p >> c >> d >> q){
 
        x = (double)((p * d - b * q) / (a * d - b * c));
        y = (double)((a * q + p * c) / (a * d - b * c));
        if (x == 0)x = 0;
        if (y == 0)y = 0;
        printf("%.3f %.3f\n", x, y);
    }
}

C++: #include <iostream>
#include <cstdio>
int main(){
double a,b,c,d,e,f,x,y;
while(std::cin>>a>>b>>c>>d>>e>>f){
	x = (double)(b*f-c*e)/(b*d-a*e);
	y = (double)(f*a-d*c)/(a*e-b*d);
	printf("%.3f %.3f\n",x==-0.000?0.000:x, y==-0.000?0.000:y);
}
}

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

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

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

using namespace std;

int main() {

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


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

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

	//cout << fixed << setprecision(3) << ((c*e-b*f)/(a*e-b*d))  << " " << ((a*f-c*d)/(a*e-b*d)) << endl;


		printf("%03d %*s %03d",	aa,1,bb);
	
	}

	return 0;
}

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

int main(){
double a,b,c,d,e,f,x,y;
while(cin>>a>>b>>c>>d>>e>>f){
x=(c-f*b/e)/(a-d*b/e)+0.0005;
y=(c-a*x)/b+0.0005;
x-=x%0.001;
y-=y%0.001;
cout<<x<<" "<<y<<endl;}}