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 <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef complex<double> P;
typedef pair<int,int> pii;
#define REP(i,n) for(ll i=0;i<n;++i)
#define REPR(i,n) for(ll i=1;i<n;++i)
#define FOR(i,a,b) for(ll i=a;i<b;++i)

#define DEBUG(x) cout<<#x<<": "<<x<<endl
#define DEBUG_VEC(v) cout<<#v<<":";REP(i,v.size())cout<<" "<<v[i];cout<<endl
#define ALL(a) (a).begin(),(a).end()

#define MOD (ll)(1e9+7)
#define ADD(a,b) a=((a)+(b))%MOD
#define FIX(a) ((a)%MOD+MOD)%MOD

int main(){
  double a,b,c,d,e,f;
  while(~scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)){
    // ax+by=c
    // dx+ey=f
    double x,y;
    if(abs(b)<1e-9){
      x = c/a;
      y = (f-d*x)/e;
    }else{
      x = (b*f-c*e)/(b*d-a*e);
      y = (f-d*x)/e;
    }
    if(abs(x)<1e-9) x = abs(x);
    printf("%.3f %.3f\n",x,y);
  }
  return 0;
}

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

using namespace std;

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

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


double a,b,c,d,e,f;
double A,B,C,D;
int main(){
  while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f) !=EOF){
    if(a == 0){
      A =c/b;
      B = (f-e*A)/d;
      }
    if(b == 0){
      B = c/a;
      A = (f-d*B)/e;
    }
    if(d == 0){
      A =f/e;
      B = (c-b*A)/a;
    }
    if(e == 0){
      B =f/c;
      A =(c -a*B)/b;
    }
    if( a != 0&& b!=0&& d!=0 &&e!=0){
      b/=a;
      c/=a;
      a/=a;
      
      e/=d;
      f/=d;
      d/=d;
      A =(c-f)/(b-e);
      B =(c-b*A);
    }
    
    A =floor((A+0.0005)*1000)/1000;//小数第4位を四捨五入
    B =floor((B+0.0005)*1000)/1000;
    printf("%.3f %.3f\n",B,A);
  }
  return 0;
}

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

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

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

  return 0;
}

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

int main() {
	// your code goes here

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

  while(cin >> a >> b >> c >> d >> e >> f ){

    double y = (a*f-c*d)/(a*e-d*b);
    if(y == -0.0){
      y = 0.0;
    }

    double x = (c-b*y)/a;
    if(x == -0.0){
      x = 0.0;
    }

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

  }
	return 0;
}

C++: #include <stdio.h>

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

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

int main()
{
	double a,b,c,d,e,f;
	double x,y;
	while(cin >> a >> b >> c >> d >> e >> f)
	{
		double l = a*e-d*b;
		x=(c*e-b*f)/l+0;
		y=(a*f-c*d)/l+0;
		cout << fixed << setprecision(3)<< x << " " << y << endl;
	}
	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*A)/a;
    
    A =floor((A+0.0005)*1000)/1000;//小数第4位を四捨五入
    B =floor((B+0.0005)*1000)/1000;
    printf("%.3f %.3f\n",B,A);
  }
  return 0;
}

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

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

using namespace std;
typedef long long ll;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<ll> VL;
typedef vector<VL> VVL;
typedef pair<int, int> PII;

#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(x) x.begin(), x.end()
#define IN(a, b, x) (a<=x&&x<b)
#define MP make_pair
#define PB push_back
#define MOD 1000000007
#define INF (1LL<<30)
#define LLINF (1LL<<60)
#define PI 3.14159265359
#define EPS 1e-12
//#define int ll

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

C++: #include <cstdio>
void calc(int x1, int y1, int a, int x2, int y2, int b)
{
	double d1 = x2;
	double d2 = x1;
	double xx1 = d1 * x1;
	double xy1 = d1 * y1;
	double a1 = d1 * a;
	double xx2 = d2 * x2;
	double xy2 = d2 * y2;
	double b1 = d2 * b;
	double y = xy1 - xy2;
	double c = a1 - b1;
	y = c / y;


	d1 = y2;
	d2 = y1;
	xx1 = d1 * x1;
	xy1 = d1 * y1;
	a1 = d1 * a;
	xx2 = d2 * x2;
	xy2 = d2 * y2;
	b1 = d2 * b;
	double x = xx1 - xx2;
	c = a1 - b1;
	x = c / x;
	if (x == 0)
	{
		x = 0;
	}
	if (y == 0)
	{
		y = 0;
	}
	printf("%.3lf %.3lf\n", x, y);
}
int main(int argc, char const *argv[])
{
	int x1, y1, a, x2, y2, b;

	while(scanf_s("%d %d %d %d %d %d", &x1, &y1, &a, &x2, &y2, &b) != EOF)
	{
		calc(x1, y1, a, x2, y2, b);
	}

		
	return 0;
}

C++: #include<stdio.h>
#include<iostream>
#include<cmath>
#define EPS 0.00001
 
using namespace std;
 
main(){
  int a, b, c, d, e, f;
  double x, y;
  while ( cin >> a >> b >> c >> d >> e >> f ){
    x = 1.0 * ( c*e - b*f ) / ( a*e - b*d ) + EPS;
    y = 1.0 * ( c*d - a*f ) / ( b*d - a*e ) + EPS;
    printf("%.3lf %.3lf\n", x, y);
  }
}

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

double halfadjust(double x){
	int tmp = (x*10000);
	double ans = static_cast<double>(tmp)/10000;
	tmp = tmp%10;
	if(tmp >= 5)
		ans += 0.001;
	return ans;
}

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

void solve(){
	using namespace std;
	double x = (c*e-b*f)/(a*e-b*d);
	double y = (c*d-a*f)/(b*d-a*e);
	cout << setprecision(3) << fixed << halfadjust(x) << ' ';
	cout << halfadjust(y) << std::endl;
	//cout << setprecision(6);
}

int main(){
	while(true){
		std::cin >> a >> b >> c >> d >> e >> f;
		if((!a&&!b)||(!d&&!e))
			break;
		solve();
	}
	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-c*d)/(a*e-b*d);
    if(x == 0){x = 0;}
    if(y == 0){y = 0;}
  
    printf("%.3lf %.3lf\n",x,y);
  }
  return 0;
}