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

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

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

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

struct vector2{
	float x, y;
	vector2() : x(0), y(0){}
	vector2(float x, float y) : x(x), y(y){}
};

struct sim_elem{
	float a, b, c, d, e, f;
	sim_elem() :a(0), b(0), c(0), d(0), e(0), f(0){}
	sim_elem(float a, float b, float c, float d, float e, float f) :a(0), b(0), c(0), d(0), e(0), f(0){}
};

//	a / d * d
//	ey - by = f - c
//	y / y = (f - c) / y

// ax = -by + c
// ax / a = -(by + c) / a

vector2 sim_equ(sim_elem elem){

	float dx = elem.a / elem.d * elem.d;
	float ey = elem.a / elem.d * elem.e;
	float f = elem.a / elem.d * elem.f;

	float y = ey - elem.b;
	float yr = f - elem.c;
	y = yr / y;

	float ax = -elem.b * y + elem.c;
	float x = ax / elem.a;

	return vector2(x, y);
}

//	sprintf
float placement4(float val){
	char ret[128];
	val += 0.0005f;
	sprintf(ret, "%.3f", val);
	return (float)atof(ret);
}

int main(){

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

		vector2 ret;
		ret = sim_equ(elem);
		printf("%.3f %.3f\n", placement4(ret.x) ,placement4(ret.y) );
	}

	return 0;
}