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)
		if data[0] == 0 || data[1] == 0 || data[2] == 0 || data[3] == 0 || data[4] == 0 || data[5] == 0 {
			break
		}
		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 <sstream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>
#include <cassert>

using namespace std;


#define all(c) ((c).begin()), ((c).end())
#define debug(c) cerr << "> " << #c << " = " << (c) << endl;
#define iter(c) __typeof((c).begin())
#define tr(i, c) for (iter(c) i = (c).begin(); i != (c).end(); i++)
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, a, b) for (int i = (int)(a); i <= (int)(b); i++)

#define mp make_pair
#define fst first
#define snd second
#define pb push_back


const double EPS = 1e-10;


typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef complex<double> P;


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

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

using namespace std;

int main(){
    int a, b, c, d, e, f;
    /***
    |a, b| |x| - |c|
    |d, e| |y| - |f|
     ***/
    while (cin >> a >> b >> c >> d >> e >> f) {
	int p, q, r, s;
	double det = (a*e - b*d);
	p = e;
	q = -b;
	r = -d;
	s = a;

	double x, y;
	x = (p*c + q*f) / det;
	y = (r*c + s*f) / det;
	
	printf("%.3lf %.3lf\n", x, y);
    }

    return 0;
}

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

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

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

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

	return 0;
}

C++: /* Simultaneous Equation */

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

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

  return 0;
}

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)!=EOF){
  printf("%.3f %.3f\n",(c * e - b * f) / (a * e - b * d),(a*f-d*c)/(a*e-b*d));
 };
 return 0;
};

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

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

    return 0;
}

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

#define pout(n)  printf ("%d\n", n)

#define rep(i,a,n) for (int i = a;i < n;i++)
#define per(i,n,a) for (int i = n-1;i >= a;i--)

const int d4x[4] = {1, 0, -1, 0};
const int d4y[4] = {0, 1, 0, -1};
const int d8x[8] = { 1,1,0,-1,-1,-1,0,1 };
const int d8y[8] = { 0,1,1,1,0,-1,-1,-1 };
 
typedef long long ll;
using namespace std;
 
int main() {
  double a,b,c,d,e,f,x,y;

  while(cin >> a >> b >> c >> d >> e >> f;){
    y = (c*d-a*f)/(b*d-a*e);
    x = (c-b*y)/a;
  }
  

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

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

int main(){
	int count = 0;
	double x[100],y[100];
	double a, b, c, d, e, f;
	while(cin >> a >> b >> e >> c >> d >> f){
		x[count] = (e*d-b*f)/(a*d-b*c);
		y[count] = (a*f-e*c)/(a*d-b*c);
		count++;
	}
	for(int i = 0; i < count; i++){
		cout << x[i] << " " << y[i] << endl;
	}
}