Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

var sc = bufio.NewScanner(os.Stdin)

func read() string {
	sc.Scan()
	return sc.Text()
}

func main() {
	sc.Split(bufio.ScanLines)
	for sc.Scan() {
		s := strings.Split(sc.Text(), " ")
		a, _ := strconv.ParseFloat(s[0], 64)
		b, _ := strconv.ParseFloat(s[1], 64)
		c, _ := strconv.ParseFloat(s[2], 64)
		d, _ := strconv.ParseFloat(s[3], 64)
		e, _ := strconv.ParseFloat(s[4], 64)
		f, _ := strconv.ParseFloat(s[5], 64)
		x := ((b * f) - (c * e)) / ((b * d) - (a * e))
		y := ((a * f) - (c * d)) / ((a * e) - (b * d))
		if x == 0 {
			fmt.Printf("0.000 %.3f\n", y)
		} else if y == 0 {
			fmt.Printf("%.3f 0.000\n", x)
		} else {
			fmt.Printf("%.3f %.3f\n", x, y)
		}
	}
}

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;
}

C++: #include<iostream>
int main(){for(float a,b,c,d,e,f,y,s;s=!(std::cin>>a>>b>>c>>d>>e>>f).eof();s&&printf("%.3f %.3f\n",d?f/d-e*y/d:c/a-b*y/a,y))y=c*d-a*f,y/=b*d-a*e;}

C++: #include <iostream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <deque>
#include <list>
#include <string>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>

using namespace std;

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

int main() {
	a = -10000;
	cin >> a >> b >> c >> d >> e >> f;

	while (a != -10000) {
		x = (c * e - f * b) / (a * e - d * b);
		y = (c * d - f * a) / (b * d - e * a);

		if (x > -0.001 && x <= 0) x = 0;
		if (y > -0.001 && y <= 0) y = 0;

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

		a = -10000;
		cin >> a >> b >> c >> d >> e >> f;
	}

	return 0;
}

/*@@@@@@@@@@@@@@@@@@@@@@@@@*/
/*@                       @*/
/*@ debug output erased ? @*/
/*@                       @*/
/*@@@@@@@@@@@@@@@@@@@@@@@@@*/

C++: #include<stdio.h>
#include<string.h>

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

	while(scanf("%d %d %d %d %d %d", &a,&b,&c,&d,&e,&f) != EOF){
		x = (e*c - b*f)/(a*e - b*d);
		y = (f/e) - (d/e)*x;

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

	return 0;
}

C++: #include<iostream>
#include<stdio.h>
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;
        printf("%.3f %.3f\n", x, y);
    }
    return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <cmath>
int main(void)
{
    double a,b,c,d,e,f;
    double x,y;
    std::cout << std::showpoint << std::setprecision(4);
    while(std::cin >> a >> b >> c >> d >> e >> f){
        x = (c * e - b * f) / (a * e - b * d) * 1000;
        x = (x >= 0.0 ? std::floor(x + 0.5) : std::ceil(x - 0.5)) / 1000;;
        y = (f * a - c * d) / (a * e - b * d) * 1000;
        y = (y >= 0.0 ? std::floor(y + 0.5) : std::ceil(y - 0.5)) / 1000;
        std::cout << x << " " << y << std::endl;
    }
    return 0;
}

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

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

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

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

    return 0;
}

C++: z = []
while True:
	try:
		a, b, c, d, e, f = map(float, raw_input().split())
		x = (c * e - b * f) / (a * e - d * b)
		y = (c * d - f * a) / (b * d - e * a)
		z.append([x, y])
	
	except:
		break
for i in z:
	print("{:.3f} {:.3f}".format(i[0] + 0, i[1] + 0))