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 <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <climits>
#include <cmath>
#include <complex>
#include <map>
#include <set>
#include <vector>
#include <stack>
#include <queue>
#include <bitset>
#include <algorithm>
#include <numeric>
#include <functional>
#include <cassert>
#include <iomanip>
using namespace std;

#define Rep(b, e, i) for(int i = b; i <= e; i++)
#define Repr(e, b, i) for(int i = e; i >= b; i--)
#define rep(n, i) Rep(0, n-1, i)
#define repr(n, i) Repr(n-1, 0, i)
#define all(v) (v).begin(), (v).end()
#define pb(v) push_back(v)
#define uniq(v) (v).erase(unique(all(v)),(v).end())
#define bitcnt(x) __builtin_popcount(x)
#define fst first
#define snd second
#define Pqaz(T) priority_queue<T,vector<T>,greater<T>>
#define Pqza(T) priority_queue<T>
#define put(x) cout << x;
#define putsp(x) cout << x << ' ';
#define putbd cout << "---------------------------------------------" << endl;
#define putln(x) cout << x << endl;
#define debug(x) cerr << #x << "=" << x << endl;
#define ENJYU std::ios::sync_with_stdio(false);std::cin.tie(0);
#define yuiyui 0

typedef long long ll;
typedef unsigned long long ul;
typedef pair<int, int> intP;
typedef pair<ll, ll> llP;
typedef pair<ul, ul> ulP;
typedef complex<double> comp;
typedef vector <int> vec;
typedef vector <ll> vecll;
typedef vector <ul> vecul;
typedef vector <double> vecd;
typedef vector <vec> mat;
typedef vector <vecll> matll;
typedef vector <vecul> matul;
typedef vector <vecd> matd;

//vector の中身を出力
template <class T>ostream &operator<<(ostream &o,const vector<T>&v)
{o<<"{";for(int i=0;i<(int)v.size();i++)o<<(i>0?", ":"")<<v[i];o<<"}";return o;}

const int MAX = 200020;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const int INF = 1<<29;
const ll INFL = 1e18;
const ll MOD = 1e9+7;

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

//********************************template END****************************************//

void solve(void){

	long double a,b,c,d,e,f;

	while(~scanf("%Lf%Lf%Lf%Lf%Lf%Lf\n", &a,&b,&c,&d,&e,&f))
	{
		long double x = (c*e-b*f)/(a*e-b*d);
		long double y = (c*d-a*f)/(b*d-a*e);

		if (abs(x)<1e-4) x = abs(x);
		if (abs(y)<1e-4) y = abs(y);

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

	}

}

int main(void)
{
	solve();
	//cout << "yui(*-v・)yui" << endl;
	return yuiyui;
}

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("%.4lf %.4lf\n", x, y);
		
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
 
int main(void)
{
    int a, b, c, d, e, f;
    while(cin >> a >> b >> c >> d >> e >> f){
        double y = (double)(f*a-c*d)/(a*e-b*d);
        double x = (double)(c-b*y)/a;
        printf("%.3f %.3f\n", x, y);
    }
    return(0);
}

C++: #include<iostream>
#include<iomanip>
#include<cmath>
using namespace std;
#define EPS (1.0e-3)

int main(){
	double a,b,c,d,e,f;
	double x,y;
	while(cin>>a>>b>>c>>d>>e>>f){
		b=d*b-a*e;
		c=d*c-a*f;
		y=c/b;if(abs(y)<EPS) y=0;
		x=(f-e*y)/d;if(abs(x)<EPS) x=0;
		cout<<setprecision(3)<<setiosflags(ios::fixed)<<x<<" "<<y<<endl;
	}
	return 0;
}

C++: #include<iostream>
#include<iomanip>
#include<cmath>
using namespace std;
#define EPS (5.0e-4)

double t;
double a,b,c,d,e,f;

void swap(double *a,double *b){
	double t=*a;
	*a=*b;
	*b=t;
}

int main(){
	cout<<setprecision(3)<<setiosflags(ios::fixed);
	while(cin>>a>>b>>c>>d>>e>>f){
		if(a==0){
			swap(a,d);
			swap(b,e);
			swap(c,f);
		}
		b/=a; c/=a; a=1;
		e-=d*b; f-=d*c; d=0;
		f/=e; e=1;
		c-=f*b; b=0;
		if(abs(c)<EPS) c=0;
		if(abs(f)<EPS) f=0;
		cout<<c<<" "<<f<<endl;
	}
	return 0;
}

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

using namespace std;

int main()
{
    double a,b,c,d,e,f;
    while (cin>>a>>b>>c>>d>>e>>f) {
        double y = (c * d - f * a) / (b * d - a * e);
        double x = (f - e * y) / d;

        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,x,y;
	while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)){
		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("%.3ld %.3ld",x,y);
	}
	return 0;
}

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

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

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

#include <math.h>
using namespace std;

int main()
{
	double A, B, C, D, E, F, X, Y, G , H;

	while(cin >> A >> B >> C >> D >> E >> F)
	{
		G = A / D;
		D *= G;
		E *= G;
		F *= G;
		Y = (F-C) / (E-B);
		
		D /= G;
		E /= G;
		F /= G;
		H = B / E;
		D *= H;
		E *= H;
		F *= H;
		X = (F-C) / (D-A);

		printf("%.3f %.3f\n",X,Y);
	}

	return 0;
}

C++: #include<iostream>


using namespace std;

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

		x=(e*c-f*b)/(e*a-b*d);
		y=(d*c-f*a)/(b*d-a*e);
		x*=1000;
		x+=0.5;
		x=(long)x;
		x/=1000;

		y*=1000;
		y+=0.5;
		y=(long)y;
		y/=1000;

		cout<<x<<" "<<y<<endl;

		x=y=a=b=c=d=e=f=0;
	}
}

C++: #include <iostream>
#include <cstdio>
#include <limits>
#define eps 1e-10
using namespace std;

int main(void) {
    double a, b, c, d, e, f;
    //double inf = numeric_limits<double>::infinity();
    while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF) {
        double ya = d * c - a * f;
        double yb = b * d - a * e;
        if(yb == 0) yb += eps;
        double y = ((ya) / (yb));
        //if(yb == 0) y = inf;
        if(a == 0) a += eps;
        double x = ((c - b * y) / a);
        //if(a == 0) x = inf;
        printf("%.3f %.3f\n",x, y);
    }
    
    return(0);
}

C++: #include <iostream>
#include <math.h>
#include <cstdio>

using namespace std;

double a, b, c, d, e, f;
double tmp_x, tmp_y, tmp;

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