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 <cstdio>
#include <iostream>
#include <algorithm>
#include <cmath>

using namespace std;


int main(){
	int a,b,c,d,e,f;
	while(cin>>a>>b>>c>>d>>e>>f){
		double det = a*e - b * d;
		double x = 1 / det * (c * e - b * f);
		double y = 1 / det * (f * a - c * d);
		if(x == -0.0) x = 0.0;
		if(y == -0.0) y = 0.0;
		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);
		if (x == -0.0) {
			x = 0.0;
		}
		if (y == -0.0) {
			y = 0.0;
		}
		printf("%.3f %.3f\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;
    double det;

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

        if (x == 0)
            x = 0;
        if (y == 0)
            y = 0;
        cout << setprecision(3);
        cout << fixed;
        cout << x << ' ' << y << endl;
    }

    return 0;
}

C++: #include<iostream>
#include<string>
#include<cmath>
#include<cstdio>
#include<vector>
#include<stack>
#include<queue>
#include<algorithm>
#include<complex>
using namespace std ;
typedef vector<int> vi ;
typedef vector<vi> vvi ;
typedef vector<string> vs ;
typedef pair<int, int> pii; 
typedef long long ll ;

#define loop(i,a,b) for(int i = a ; i < b ; i ++)
#define rep(i,a) loop(i,0,a)
#define all(a) (a).begin(),(a).end()
#define EPS 1e-9

int main(void){
  int a,b,c,d,e,f;
  float x,y,dx,dy;
  while(cin >> a >> b >> c >> d >> e >> f){
    x = (c*e-b*f) / (float)(a*e-b*d);
    y = (c - a*c) / (float)b;
    printf("%.3f %.3f\n",x+EPS,y+EPS);
  }
}

C++: /*
C++ ???????????????????????????????????¬??????
??????AOJ-ITP1??????????????????
*/

#define _USE_MATH_DEFINES

#include <iostream> // ?¨??????\??????
#include <fstream>  // ??????????????\??????
#include <string>   // ???????????¢???
#include <vector>   // ???????????????
#include <cmath>    // ??°??????
#include <iomanip>  // stream???????????¢???
#include <algorithm>// max??¢??°??????

using std::cin;
using std::cout;
using std::endl;
using std::string;
using std::vector;        // ????´???°????????????????????????
using std::fixed;         // ???????????????????¨???????????????????????????????
using std::setprecision;  // ?????°????°???°?????\???????????°????????????????????¨????????\???

int main() {
	double a, b, p, c, d, q;
	double x, y;

	while (cin >> a >> b >> p >> c >> d >> q)
	{
		x = (p*d - b*q) / (a*d - b*c);
		y = (a*q - p*c) / (a*d - b*c);
		if (-0.0005 < x && x < 0.0005) x = 0.0;
		if (-0.0005 < y && y < 0.0005) y = 0.0;
		cout << fixed << setprecision(3) << x << " " << y << endl;
	}
	return 0;
}

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

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

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

void houteisiki(double a, double b, double c, double d, double e, double f)
{
	double x, y;
    y = (c*d - a*f) / (b*d - a*e);
    x = (c - (b*y)) / a;
   
    printf("%4.3f %4.3f\n",x,y);
}

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

	while(cin >> a >> b >> c >> d >> e >> f)
		houteisiki(a, b, c, d, e, f);

	return 0;
}

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

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

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

using namespace std;

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

int main(){
	while(cin >> a >> b >> c >> d >> e >> f){
		printf("%8.3lf ",(c/a)-((b*c*d-a*b*f)/(a*b*d-a*a*e)));

		printf("%8.3lf\n",(c*d-a*f)/(b*d-a*e));
	}
    return 0;
}

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

int main(void)
{
    double a, b, c, d, e, f;
    while(cin >>a >> b >> c >> d >> e >> f) {
        double g = a * e - b * d;
        double h = (e * c - b * f) / g;
        double i = (-d * c + a * f) / g;
        cout << fixed << setprecision(3) << h << " " << i << endl;
    }
    return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cctype>
#include<algorithm>
#define pf printf
#define sf scanf
#define wh while
#define db double
#define LL long long
#define _USE_MATH_DEFINES
#define re(i,a,b) for(int i=a;i<b;i++)
#define rev(i,a,b) for(int i=a;i>=b;i--)

using namespace std;

int main()
{
    db a,b,c,d,e,f,x;
    wh(cin>>a>>b>>c>>d>>e>>f){
        db q=(b/a)*d*(-1);
        db r=(c/a)*d*(-1);
        db y=((r+f)/(q+e));
        db p=e*y;
        if(p==f)x=0;
        else x=(f-p)/d;
        pf("%.3lf %.3lf\n",x,y);
    }
    return 0;
}

C++: #include <iostream>
#include <iomanip>
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.00){x=0.00;}
		if(y == -0.00){y=0.00;}
		cout<<setprecision(3)<<fixed;
		cout<<x<<" "<<y<<endl;
	}
	return 0;
}

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

using namespace std;

double delta(double o, double p, double q , double r, double s, double t) {

	//cout << "o=" << o << "s=" << s << "v=" << "r=" << "o*s-p*r=" << (o*s-p*r)  << endl;

	// |o  p ||x|   |q|
	// |r  s ||y| = |t|

	return (o*s-p*r);//a???o b???p c???q d???r e???s f???t
}

double deltacfbe(double o, double p, double q , double r, double s, double t) {

	//cout << "o=" << o<< "s=" << s << "p=" << "r=" << "q*s-p*t=" << q*s-p*t  << endl;

	// x = |q  p | /delta
	//     |t  s | 

	return (q*s-p*t);
}

double deltaadcf(double o, double p, double q , double r, double s, double t) {

	//cout << "o=" << o<< "s=" << s << "p=" << "r=" << "o*t-q*r=" << o*t-q*r  << endl;

	// y = |o  q | /delta
	//     |r  t | 

	return (o*t-q*r);
}

int main() {

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

	cout << setprecision(3) << (deltacfbe(a,b,c,d,e,f)/delta(a,b,c,d,e,f))  << " " << (deltaadcf(a,b,c,d,e,f)/delta(a,b,c,d,e,f)) << endl;
	
	}

	return 0;
}