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

    double a, b, c, d, e, f;
    while (cin >> a >> b >> c >> d >> e >> f) {
        double x = round((c * e - b * f) / (a * e - b * d) * 1000.0) / 1000.0;
        double 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>
#include <stdio.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(x == 0) x = 0;
    if(y == 0) y = 0;
    printf("%.3f %.3f\n",x,y);
  } 
  return 0;
}

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

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

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

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

		x *= 10000;
		x = x + 0.5 - (x < 0);
		x = (int)x;
		x /= 10000;

		y *= 10000;
		y = y + 0.5 - (y < 0);
		y = (int)y;
		y /= 10000;


		cout << setprecision(4) << showpoint << x << " " << y << endl;
	}

	return 0;
}

C++: #include <stdio.h>
using namespace std;
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) {
		int a1 = a, b1 = b, c1 = c, d1 = d, e1 = e, f1 = f;
		a1 *= e;
		b1 *= e;
		c1 *= e;
		d1 *= b;
		e1 *= b;
		f1 *= b;
		printf("%.3f ", (double) (f1 - c1) / (d1 - a1));

		b *= d;
		c *= d;
		d *= a;
		e *= a;
		f *= a;
		printf("%.3f\n", (double) (f - c) / (e - b));
	}
	return 0;
}

C++: //#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS
#include <cstdio>
//#include <cstdlib>
#include <cmath>
#include <iostream>
#include <algorithm>
//#include <cstring>
#include <vector>
#include <string>
#include <map>
#include <list>
#include <queue>
#include <set>
using namespace std;

int main(void){

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

	return 0;
}

/*
for(i=0;i<N;i++){
	cin >> X[i];
}


for(i=0;i<N;i++){
	for(j=0;j<N;j++){
		cin >> X[i][j];
	}
}
*/

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){
    if(-1000 <= a && a<=1000 &&-1000 <= b && b<=1000 &&-1000 <= c && c<=1000 &&-1000 <= d && d<=1000 &&-1000 <= e && e<=1000 &&-1000 <= f && f<=1000){
  double x, y;
  x = ((b*f)/e -c)/((b*d)/e-a);
  y = ((a*f)/d -c)/((a*e)/d-b);
  if(y == 0)y = 0;
  if(x == 0)x = 0;
  cout << fixed << setprecision(3) << x << " " << y << endl;
    }else break;
}
  return 0;
}

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

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

C++: #include <cstdio>

int main(){
    double a,b,c,d,e,f;
    while(scanf("%lf %lf %lf %lf %lf %lf", &a,&b,&c,&d,&e,&f)+1){
        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;
        //x = ((int)(x*1000+0.5))/1000;
        //y = ((int)(y*1000+0.5))/1000;
        printf("%.3lf %.3lf\n", x, y);
        //printf("%.3lf %.3lf\n", x+0.0005, y+0.0005);
    }

   // double dd = 1.3335;
   // printf("%.3lf\n", dd);
   // //dd = ((int)(dd*1000+0.5))/1000;
   // printf("%.3lf\n", dd*1000);
   // printf("%.3lf\n", dd*1000+0.5);
   // printf("%.3lf\n", ((int)(dd*1000+0.5))/1000);
   // printf("%.3lf\n", dd);
    

    return 0;
}

C++: #include<iostream>
#include<cstdio>
#define LL long long
using namespace std;

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

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

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

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

	return 0;
}

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

double get_num(double x){
	x = x * 1000;
	if(x >= 0){
		x = (int)(x + 0.5);
		return ((double)x / 1000);
	} else {
		x = (int)(x - 0.5);
		return ((double)x / 1000);
	}
}

int main(){
	double a, b, c, d, e, f;
	double x, y;
	while(cin >> a >> b >> c
		>> d >> e >> f)
	{
		y = (c * d - f * a) / (b * d - e * a);
		if(a == 0){
			x = (f - e * y) / d;
		} else {
			x = (c - b * y) / a;
		}
		x = get_num(x);
		y = get_num(y);
		cout << setprecision(4) << showpoint << x << " " << y << endl;
	}
	return 0;
}

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

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