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>
using namespace std;

int det(int a00, int a01, int a10, int a11)
{
	return a00*a11 - a01*a10;
}

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

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;
		if (fabs(x) < EPS) x = 0;
		if (fabs(y) < EPS) y = 0;
		printf("%.3f %.3f\n", x, y);
	}
	return 0;
}

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

using namespace std;

pair<double, double> solve(int a, int b, int c, int d, int e, int f){
  double pre = b * d - a * e;
  int pre_x = f * b - c * e;
  int pre_y = c * d - a * f;
  pair<double, double> ans;
  
  ans.first = pre_x == 0 ? 0.0 : pre_x / pre;
  ans.second =  pre_y == 0 ? 0.0 : pre_y / pre;

  return ans;
}

int main(){
  int a, b, c, d, e, f;
  vector< pair<double, double> > ans;

  while(cin >> a && cin >> b && cin >> c && cin >> d &&	cin >> e && cin >> f) ans.push_back(solve(a, b, c, d, e, f)); 

  for(int i = 0; i < (int)ans.size(); i++) printf("%.3f %.3f\n", ans[i].first, ans[i].second);
  
  return 0;
}

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

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

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

    f /= e;
    c -= b*f;
    c /= a;

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

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

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

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

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

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

C++: #include <cstdio>
#include <iostream>
using namespace std;
int main(){
	/*ax+by=c
	 *dx+ey=f
	 *
	 *aex+bey=ce
	 *bdx+bey=bf
	 *(ae-bd)x=ce-bf
	 *x=(ce-bf)/(ae-bd)
	 *
	 *adx+bdy=dc
	 *adx+aey=af
	 *(bd-ae)y=dc-af
	 *y=(dc-af)/(bd-ae)*/
	int a,b,c,d,e,f;
	while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)!=EOF){
		printf("%.3lf %.3lf\n",(double)(c*e-b*f)/(a*e-b*d)+0.00049999,(double)(d*c-a*f)/(b*d-a*e)+0.00049999);
	}
	return 0;
}

C++: #include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

int sign(int a){
    if(a >= 0)
        return 1;
    return -1;
}

int main()
{
    const int TMP = 10000;
    for(;;){
        int a,b,c,d,e,f;
        if(!(cin >> a >> b >> c >> d >> e >> f))
            return 0;
        int x = TMP * (c*e - b*f) / (a*e - b*d);
        int y = TMP * (c*d - a*f) / (b*d - a*e);
        if(abs(x) % 10 >= 5)
            x += 10 * sign(x);
        if(abs(y) % 10 >= 5)
            y += 10 * sign(y);
        x /= 10;
        y /= 10;
        printf("%d.%04d %d.%04d\n", x/TMP, abs(x)%TMP, y/TMP, abs(y)%TMP);
    }
}

C++: #include <string>
#include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <utility>
#include <vector>
#include <iomanip>


using namespace std;


int main(void) {
	int a, b, c, d, e, f;
	float x, y;
	while(cin >> a >> b >> c >> d >> e >> f){
		x = round((float)(c*e - b*f) / (a*e - b*d) * 1000) / 1000;
		y = round((float)(a*f - c*d) / (a*e - b*d) * 1000) / 1000;
		if(abs(x) < 0.0005)x = 0.0;
		if(abs(y) < 0.0005)y = 0.0;
		printf("%.3f %.3f\n", x, y);
	}
}

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

int main()
{
    using namespace std;
    double a, b, c, d, e, f, x, y;
    cout.precision(3);
    cout << fixed << showpoint;
    while (cin >> a >> b >> c >> d >> e >> f) {
        double coef = d/a;
        b *= coef; c *= coef;
        y = (c - f)/(b - e); y = round(y*1000)/1000;
        x = (c - b*y)/a; x = round(x*1000)/1000;
        cout << x << " " << y << endl;
    }
}

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

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

	while(cin >> a >> b >> c >> d >> e >> f){
		float x, y;
		x = (float)(b*f - c*e)/(b*d -a*e);
		y = (float)(c - a*x)/b;
		cout << x << " " << y << 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 x, y;
    x = (e * c - b * f) / (a * e - b * d);
    y = (a * f - d * c) / (a * e - b * d);

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

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