Go: package main

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

func gcd(num1, num2 int) int {
	if num2 == 0 {
		return num1
	}
	num3 := num1 % num2
	return gcd(num2, num3)
}

func lcm(num1, num2 int) int {
	if num1%num2 != 0 {
		num3 := gcd(num1, num2)
		for i := 1; ; i++ {
			check := num3 * i
			if check%num1 == 0 && check%num2 == 0 {
				return check
			}
		}
	} else {
		return num1
	}
}

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]
		lcm := lcm(a, d)
		mulA := lcm / a
		mulD := lcm / d
		a *= mulA
		b *= mulA
		c *= mulA
		d *= mulD
		e *= mulD
		f *= mulD

		if d < 0 {
			d *= -1
			e *= -1
			f *= -1
		}

		bE := b - e
		cF := c - f
		y := cF / bE
		x := (c - (y * b)) / a

		fmt.Printf("%d.000 ", x)
		fmt.Printf("%d.000\n", y)
	}
}

C++: #include <cstdio>
#include <iostream>
double sol[10000][2];
int main()
{
    double a, b, e, c, d, f;
    int i = 0;
    while (std::cin >> a >> b >> e >> c >> d >> f)
    {
        double det = a * d - b * c;
 
        double aa = d / det, bb = -b / det, cc = -c / det, dd = a / det;
        sol[i][0] = aa * e + bb * f;
        sol[i][1] = cc * e + dd * f;
 
        i++;
    }
    for (int j = 0; j < i; j++)
        printf("%.3f %.3f\n", sol[j][0], sol[j][1]);
    return 0;

C++: #include <iostream>
#include <stdio.h>
#include <math.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 = (a * f - c * d) / (a * e - b * d);
    x *= 1000;
    x += 0.5;
    x = floor(x);
    x /= 1000;
    y *= 1000;
    y += 0.5;
    y = floor(y);
    y /= 1000;
    printf("%.3f %.3f\n", x, y);

  }
  return 0;
}

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

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;
	}
}