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>
#include <stdio.h>
#include <math.h>
using namespace std;

int main(){
	double a,b,c,d,e,f;
	while(cin >> a >> b >> c >> d >> e >> f){
		double t = 1 / (a*e - b*d);
		double x = (e*c - b*f);
		x *= (x == 0.0) ? 0.0 : t;
		double y = (a*f - c*d) ;
		y *= (y == 0.0) ? 0.0 : t;
		printf("%.3f %.3f\n", round(x*1000)/1000.0, round(y*1000)/1000.0);
	}
	return 0;
}

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


double a,b,c,d,e,f;
double A,B;//x,y座標
int main(){
  while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f) !=EOF){
    B =(c*e-f*b)/(a*e-b*d);
    A = (c -b*B)/a;
    
    if(A ==0)
      A =0;
    if(B ==0)
      B =0;
    if(A > 0){
    A =floor((A+0.0005)*1000)/1000;
    }else if(A < 0){
    A =floor((A-0.0005)*1000)/1000;

    }
    if(B > 0){//小数第4位を四捨五入
    B =floor((B+0.0005)*1000)/1000;
    }else if(B <0){
    B =floor((B-0.0005)*1000)/1000;
    }
    printf("%.3f %.3f\n",B,A);
  }
  return 0;
}

C++: #include <stdio.h>
#include <vector>
#include <utility>
#include <algorithm>
#include <iostream>
#include <limits>
#include <iomanip>
using namespace std;
#define rep(i,n) for(int i=0;i<n;++i)
#define ld long double
ld a, b, c, d, e, f, x, y;
ld shish(ld a)
{
	if (a == 0) { return a; }
	
	a *= 1000;
	if (a > 0) {
		a += 0.51;
	}
	else {
		a -= 0.51;
	}
	a = (ld)((int)a);
	a /= 1000;
	return a;
}
int main() {
	while (cin >> a >> b >> c >> d >> e >> f) {
		y = (a*f - c*d) / (ld)(a*e - b*d);
		x = (c*e - f*b) / (ld)(a*e - b*d);

		x = shish(x);
		y = shish(y);
		cout << fixed << setprecision(10) << x ;
		cout << " ";
		cout << fixed << setprecision(10) << y<< endl;
	}
	return 0;
}

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

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

	
	while (~scanf( "%d%d%d%d%d%d" ,&a,&b,&c,&d,&e,&f) )
	
	{
		double y=(double)(c*d-a*f)/(double)(b*d-a*e);
		if(a!=0)
		
		printf("%.3f %.3f\n",(c-b*y)/a,y);
		else
		printf("%.3f %.3f\n",(f-e*y)/d,y);
	}

    return 0;
    
    }

C++: #include <cstdio>

int main (int argc, char *argv[]) {
	using namespace std;
	int a, b, c, d, e, f;
	while (EOF != fscanf(stdin, "%d %d %d %d %d %d\n", &a, &b, &c, &d, &e, &f)) {
		float tmp1 = static_cast<float>(f)-(static_cast<float>(c)*static_cast<float>(d)/static_cast<float>(a));
		float tmp2 = static_cast<float>(e)-(static_cast<float>(b)*static_cast<float>(d)/static_cast<float>(a));
		float y = tmp1/tmp2;
		float x = (static_cast<float>(c) - static_cast<float>(b) * y) / static_cast<float>(a);
		printf("%.3f %.3f\n", x, y);		
		//printf("y=%f\n", (f-(c*d/a))/(e-(b*d/a)));
	}
	
	return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>


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

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

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

	return 0;
}

C++: #include<iostream>
int main(){for(float a,b,c,d,e,f,y,s=1;s;printf("%.3f %.3f\n",d?f/d-e*y/d:c/a-b*y/a,y))s=!(std::cin>>a>>b>>c>>d>>e>>f).eof(),y=c*d-a*f,y/=b*d-a*e;}

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

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) {
    int nx = c * e - b * f, ny = a * f - c * d;
    int de = a * e - b * d;
    cout << prec(3) << g(1.0 * nx / de) << ' ' << g(1.0 * ny / de) << endl;
  }
}

C++: #include <iostream>

using namespace std;

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

int main()
{
	solve();
	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 = (a * f - c * d) / (a * e - b * d);
    printf("%.3f %.3f\n", x, y);

  }
  return 0;
}

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

using namespace std;

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

C++: #include <bits/stdc++.h>

#define REP(i, n) for (int i = 0; i < (n); i++)
#define FOR(i, init, n) for(int i = init; i < (n); i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define fi first
#define se second

using namespace std;
using ll = long long int;
using P = pair<int, int>;
using T = tuple<int, int, int>;
using edge = struct
{
    int to, cost;
};

const int MOD = 1e9 + 7;
const int iINF = 1e9;
const long long int llINF = 1e18;
const double PI = acos(-1.0);

const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};

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

        if(x == 0)
            x = 0;
        
        if(y == 0)
            y = 0;
            
        printf("%.3lf %.3lf\n", x, y);
    }

    
    return 0;
}