Go: package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	var strs []string
	var a, b, c, d, e, f float64
	var x, y float64
	for scanner.Scan() {
		strs = strings.Split(scanner.Text(), " ")
		_a, _ := strconv.Atoi(strs[0])
		_b, _ := strconv.Atoi(strs[1])
		_c, _ := strconv.Atoi(strs[2])
		_d, _ := strconv.Atoi(strs[3])
		_e, _ := strconv.Atoi(strs[4])
		_f, _ := strconv.Atoi(strs[5])
		a = float64(_a)
		b = float64(_b)
		c = float64(_c)
		d = float64(_d)
		e = float64(_e)
		f = float64(_f)
		y = (c*d - f*a) / (d*b - a*e)
		x = (c - b*y) / a

		fmt.Printf("%.3f %.3f\n", x, y)
	}
}

C++: #include <bits/stdc++.h>
using namespace std;
//#include <boost/multiprecision/cpp_int.hpp>
//using multiInt = boost::multiprecision::cpp_int;

using ll = long long int;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
template<typename Q_temp>
using smaller_queue = priority_queue <Q_temp, vector<Q_temp>, greater<Q_temp> >;

const int INF = (int) 1e9;
const ll LINF = (ll) 4e18;
const ll MOD = (ll) (1e9 + 7);
const double PI = acos(-1.0);
const int limit = 100010;

#define REP(i,m,n) for(ll i = m; i < (ll)(n); ++i)
#define rep(i,n) REP(i, 0, n)
#define MP make_pair
#define MT make_tuple
#define YES(n) cout << ((n) ? "YES" : "NO") << endl
#define Yes(n) cout << ((n) ? "Yes" : "No") << endl
#define Possible(n) cout << ((n) ? "Possible" : "Impossible") << endl
#define all(v) v.begin(), v.end()
#define NP(v) next_permutation(all(v))
#define dbg(x_) cerr << #x_ << ":" << x_ << endl;
#define dbg2(x_) for(auto a_ : x_) cerr << a_ << " "; cerr << endl;
#define dbg3(x_ , sx_) rep(i, sx_) cerr << x_[i] << " "; cerr << endl;
vector<int> Dx = {0, 0, -1, 1, -1, 1, -1, 1, 0};
vector<int> Dy = {1, -1, 0, 0, -1, -1, 1, 1, 0};

inline ll CEIL(ll a, ll b) {
    return (a + b - 1) / b;
}

//------------------------------------------------------

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

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

    return 0;
}

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

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

C++: #include<iostream>
#include<cstdio>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)

int main()
{
    while(1)
    {
    double a,b,c,d,e,f;
    cin >> a;
    if(cin.eof())break;
    cin >> b;
    cin >> c;
    cin >> d;
    cin >> e;
    cin >> f;
    double det = a*e-b*d;
    double ans1 = (c*e-b*f)/det;
    if(ans1==-0.0)ans1 = -ans1;
    double ans2 = (-c*d+a*f)/det;
    if(ans2==-0.0)ans2 = -ans2;
    printf("%1.3f %1.3f\n",ans1,ans2);
    }
    return 0;
}

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


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

C++: #include <stdio.h>
int main(){
    double a,b,c,d,e,f;
    while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)!=EOF){
        printf("%.3lf %.3lf\n",(b*f-c*e)/(b*d-a*e),(c*d-f*a)/(b*d-a*e));
    }
}

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

C++: #include <iostream>
//#include <iomanip>
//#include <vector>
//#include <string>
#include <algorithm>
#include <functional>

using namespace std;

int main(){

	int a, b, c, d, e, f;
	double x, y, A;

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



	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;
                printf("%.3f %.3f\n",x,y);
        }
        return 0;
}
~
~

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

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

C++: #include <stdio.h>
#include<string>
#include<string.h>
#include <math.h>
#include<iostream>
#include <algorithm>
#include <map>
#include <vector>
#include <queue>
using namespace  std;


/*
//my header
#include "define.h"
#include "geometry.h"*/

#define MyAbs(a) ((a)>0?(a):-(a))
#define MyEqualDoule(a,b) (MyAbs(a-b)<1e-6)

void init()
{
#ifdef _WIN32
	freopen("1.txt", "r", stdin);
#endif
}

void func();

int main()
{
	init();
	func();

	return 0;
}


void func()
{
	int a,b,c,d,e,f;
	float x, y;
	while(~scanf("%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f))
	{
			x = (c*e-f*b)*1.0/(a*e - b*d);
			y = (c*d-a*f)*1.0/(b*d - a*e);
			float x2 = (c-b*y)*1.0/a;
			if(x-x2 != 0)
				while(1);
			if(MyEqualDoule(x, 0))
				x = 0;
		printf("%.3f %.3f\n", x, y);
	}
}

C++: #include <iostream>
int main(){
	for(float a,b,c,d,e,f;;printf("%0.3f %0.3f\n",(f-e*(c*d-a*f)/(b*d-a*e))/d,(c*d-a*f)/(b*d-a*e))){
		std::cin>>a>>b>>c>>d>>e>>f;
		if(std::cin.eof())break;
	}
}