Go: package main

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

var sc = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)

func main() {
	sc.Split(bufio.ScanWords)
	defer out.Flush()
	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 float64(((c * e) - (b * f)) / ((a * e) - (b * d)))
}

func GetY(a, b, c, d, e, f float64) float64 {
	return float64(((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>
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(-0.0004<x&&x<=0)x=0;
		if(-0.0004<y&&y<=0)y=0;
		printf("%.3lf %.3lf\n",x,y);
	}
	return 0;
}

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

int main(){
  for(double a1,b1,c1,d1,e1,f1,b2,c2,e2,f2,a3,c3,d3,f3,x,y;cin>>a1>>b1>>c1>>d1>>e1>>f1;){

    b2=b1*d1;
    c2=c1*d1;

    e2=a1*e1;
    f2=a1*f1;

    y=(c2-f2)/(b2-e2);
    if(y==-0.000){
      y=0.000;
    }

    a3=a1*e1;
    c3=c1*e1;

    d3=b1*d1;
    f3=b1*f1;

    x=(c3-f3)/(a3-d3);
    if(x==-0.000){
      x=0.000;
    }

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

C++: #include<stdio.h>
int main(void){
	int a,b,c,d,e,f;
	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){
		B=b*d;
		C=c*d;
		E=a*e;
		F=a*f;
		y=(C-F)/(B-E);
		A=a*e;
		C=c*e;
		D=b*d;
		F=b*f;
		x=(C-F)/(A-D);
		printf("%1.3lf %1.3lf\n",x,y);
		
	}
	return 0;
}

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

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

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

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

int main() {
        int a, b, c, d, e, f;
        double x, y;
        char line[200];

        while(fgets(line, 200, stdin) != NULL) {
                sscanf(line, "%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f);
                x = ((double)(e*c - b*f)) / (a*e - d*b);
                y = ((double)(a*f - d*c)) / (a*e - d*b);
                if(abs(x) < 1.0e-4) x = 0;
                if(abs(y) < 1.0e-4) y = 0;
                printf("%.3f %.3f\n", x, y);
        }
}

C++: #include <cstdio>

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

        printf("%.3f %.3f\n", x == -0 ? 0 : x, y == -0 ? 0 : y);
    }

    return 0;
}

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

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

  while(std::cin >>a>>b>>c>>d>>e>>f){
    std::cout << std::fixed;
    std::cout << std::setprecision(3) << (c*e-b*f)/(a*e-b*d);
    std::cout << " " << (a*f-c*d)/(a*e-b*d) << std::endl;
  }
}

C++: // clang-format off
#include <bits/stdc++.h>
#define int long long
#define main signed main()
// #define main int main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecision(n)
#define stlice(from, to) substr(from, (to) - (from) + 1)
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
using namespace std;
using pii = pair<int, int>;
using vi = vector<int>;
using vd = vector<double>;
using vc = vector<char>;
using vb = vector<bool>;
using vs = vector<string>;
using vpii = vector<pii>;
using vvi = vector<vi>;
using vvb = vector<vb>;
using vvpii = vector<vpii>;
template<typename A> using fn = function<A>;
constexpr int INF = sizeof(int) == sizeof(long long) ? 1000000000000000000LL : 1000000000;
constexpr int MOD = 1000000007;
constexpr double PI = acos(-1);
template<typename A, typename B> bool cmin(A &a, const B &b) { return a > b ? (a = b, true) : false; }
template<typename A, typename B> bool cmax(A &a, const B &b) { return a < b ? (a = b, true) : false; }
constexpr bool odd(const int &n) { return n & 1; }
constexpr bool even(const int &n) { return !odd(n); }
template<typename V> constexpr typename V::value_type sum(const V &v) { return accumulate(all(v), 0); }
void solve();
main { solve(); return 0; }
// clang-format on

pair<double, double> cramer(double a1, double a2, double b1, double b2, double c1, double c2) {
  double d   = a1 * b2 - b1 * a2;
  double nx1 = c1 * b2 - b1 * c2;
  double nx2 = a1 * c2 - c1 * a2;
  return mp(nx1 / d, nx2 / d);
}

double g(double x) {
  return double((int) (x * 1000)) / 1000;
}

void solve() {
  int a, b, c, d, e, f;
  while (cin >> a >> b >> c >> d >> e >> f) {
    pair<double, double> p = cramer(a, d, b, e, c, f);
    cout << prec(3) << g(p.first) << ' ' << g(p.second) << endl;
  }
}

C++: #include <bits/stdc++.h>
using namespace std;

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

C++: // 解二元一次方程组 
#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) {
		y = (a*f - c*d)/(a*e - b*d);
		x = (f - e*y)/d;
		if ( x == -0 ) {
			x *= -1;
		}
		if ( y == -0 ) {
			y *= -1;
		}
		cout << fixed <<setprecision(3)<< x <<" " << y << endl;	
	}
}

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

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

C++: #include <stdio.h>

int main() {
	
	double a, b, c, d, e, f;	//scanf
	double x, y;							//ans
	int t, t2;
	
	double n = 0, m = 0, j = 0, h = 0, i = 0;						//temp
	
	while(1){
		
		if (scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) == EOF) break;
		
		//printf("%lf %lf %lf\n%lf %lf %lf\n", a, b, c, d, e, f);	//input
		
		n = a / d;                                             //Xツづーツ堕オツつヲツつスツつ「
		j = d * n; h = e * n; i = f * n;
		
		//printf("%lf %lf %lf\n%lf %lf %lf\t\t%lf\n", a, b, c, j, h, i, n);
		
		m = b - h;
		y = c - i;
		//printf("%lf %lf\n", m, y);
		
		if(y != 0) y /= m;
		//printf("%lf\n", y);
		
		i = c - (b * y);
		x = i / a;
		
		//printf("x = %lf, y = %lf\n", x, y);
		
		x += 0.0005;
		y += 0.0005;
		
		x *= 1000;
		y *= 1000;
		t = (int)x;
		t2 = (int)y;
		x = t;
		y = t2;
		
		x /= 1000;
		y /= 1000;
		
		printf("%.3lf %.3lf\n", x, y);
		
	}
	return 0;
}

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

int main(){
  int i = 0;
  int a, b, c, d, e, f;

  while(scanf("%d", &a)!=EOF){
  i++;
  scanf("%d ",&b);
  scanf("%d ",&c);
  scanf("%d ",&d);
  scanf("%d ",&e);
  scanf("%d ",&f);
  
  double x, y;
  x = (double)(c*e-b*f) / (double)(a*e-b*d);
  y = (double)(a*f-c*d) / (double)(a*e-b*d);
  x = (double)round(x*10000.0) / 10000.0;
  y = (double)round(y*10000.0) / 10000.0;
  printf("%.3f %.3f\n", x, y);
  scanf("%d", &a)
  }
  return 0;
}