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

C++: #include<iostream>
#define EPS 1e-10
using namespace std;


int main()
{

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

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

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

  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 detA;
		double ansx, ansy;
		
		detA = (a*e)-(b*d);
		
		ansx = ((c*e)-(b*f))/detA;
		ansy = ((a*f)-(c*d))/detA;
		
		if(ansx == 0){
			ansx = 0;
		}
		if(ansy == 0){
			ansy = 0;
		}
		
		printf("%.3lf %.3lf\n",ansx,ansy);
	}
}

C++: #include <cstdio>
int main() {
 double a,b,c,d,e,f;
 while(scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f)!=EOF){
  prinff("%f %f\n",(c * e - b * f) / (a * e - b * d),(a*f-d*c)/(a*e-b*d));
 };
 return 0;
};

C++: #include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <utility>
#include <functional>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <climits>
using namespace std;
inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v;}
template<class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str();}
typedef vector<int> vi;
typedef vector<vi>  vvi;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef long long ll;
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define EACH(t,i,c) for(t::iretator i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define FOR(i,a,b) for(int i=(a);i<=(b);++i)
#define REP(i,n) FOR(i,0,n-1)
const double EPS = 1e-10;
const double PI = acos(-1.0);

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

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

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

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

	return 0;
}

C++: 
#include<stdio.h>
#include<math.h>
int main(void){
    double a,b,c,d,e,f,A,x,y,X,Y,Z;

    while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)!=EOF){
    A=a;
    a=a*d,b=b*d,c=c*d;
    d=d*A,e=e*A,f=f*A;

    Y=b-e,Z=c-f;
    y=Z/Y;
    x=(c-y*b)/a;
    x=x+0.0005,y=y+0.0005;
    x=x*1000,y=y*1000;
    x=floor(x);
    y=floor(y);
    x=x/1000,y=y/1000;

   printf("%.3lf %.3lf\n",x,y);
    }
   // printf("\na%lf\nb%lf\nc%lf\nd%lf\ne%lf\nf%lf\n%lf\n%lf",a,b,c,d,e,f,Y,Z);


    }

C++: #include<iostream>
#include<iomanip>
#define x_Formula(a,b,c,d,e,f) (c-(b*f)/e)/(a-(b*d)/e);
#define y_Formula(x,a,b,c) (c-(a*x))/b;

using namespace std;

double x;
double y;

void serch()
{
	int xx,yy;
	xx=x*10000;
	yy=y*10000;
	if(xx%10>4)
		x+0.001;
	if(yy%10>4)
		y+0.001;
}
int main()
{
	double num[6];
	int i;
	
	for(;cin >> num[0];)
	{
		for(i=1;i<6;i++)
			cin >> num[i];
		
		x=x_Formula(num[0],num[1],num[2],num[3],num[4],num[5])
		y=y_Formula(x,num[0],num[1],num[2])
		
		cout << setprecision(3);
		cout << setiosflags(ios::scientific);
		cout << fixed ;
		serch();
		cout << x << " " << y << endl;
	}
}