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 <stdio.h>
#include<string>
#include<string.h>
#include <math.h>
#include<iostream>
#include <algorithm>
#include <map>
#include <vector>
#include <queue>
using namespace  std;


/*
//my header
#include "define.h"
#include "geometry.h"*/

#define MyAbs(a) ((a)>0?(a):-(a))
#define MyEqualDoule(a,b) (MyAbs(a-b)<1e-6)

void init()
{
#ifdef _WIN32
	freopen("1.txt", "r", stdin);
#endif
}

void func();

int main()
{
	init();
	func();

	return 0;
}


void func()
{
	float a,b,c,d,e,f, x, y;
	while(~scanf("%f%f%f%f%f%f", &a, &b, &c, &d, &e, &f))
	{
		if(MyEqualDoule(a*e-b*d,0))
			x = 0;
		else
			x = (c*e-f*b)/(a*e - b*d);

		if(MyEqualDoule(b*d - a*e, 0))
			y = 0;
		else
			y = (c*d-a*f)/(b*d - a*e);
		printf("%.3lf %.3lf\n", x, y);
	}
}

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

int main(){
	double aa, bb, cc, a, b, c, d, e, f, x, y;				//®1:ax + by = c, ®2:dx + ey = f
	
	while(cin >>a >>b >>c >>d >>e >>f){						//EOFªüÍ³êéÜÅ[v
		aa = a; bb = b; cc = c;								//üÍ³ê½a, b, cÌlðÛ
		
		b /= a; c /= a; a /= a;								//®1F¼ÓðaÅé
		e /= d; f /= d; d /= d;								//®2F¼ÓðdÅé
		
		b -= e; c -= f;										//®1©ç®2ðø­, ÊÍ®1ÌÏÖ
		
		y = c / b;											//15sÚÌÊ©çyðvZ
		x = (cc - (bb * y)) / aa;							//®1ÉyðãüµxðvZ
		
		if(x < 0) x = ceil(x * 1000 - 0.5) / 1000;			//xð¬_ælÊÅlÌÜü(ÌÌê)(1000{¨0.5ðø­¨¬_Øã°¨1/1000{)
		else x = floor(x * 1000 + 0.5) / 1000;				//xð¬_ælÊÅlÌÜü(³ÌÌê)(1000{¨0.5ð«·¨¬_ØÌÄ¨1/1000{)
		if(y < 0) y = ceil(y * 1000 - 0.5) / 1000;			//xð¬_ælÊÅlÌÜü(ÌÌê)
		else y = floor(y * 1000 + 0.5) / 1000;				//xð¬_ælÊÅlÌÜü(³ÌÌê)
		
		printf("%.3f %.3f\n", x, y);						//x, yðoÍ
	}
	
	return 0;
}

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

using namespace std;

int main(){
  double a,b,c,d,e,f;
  vector<double> out;
  while (scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f)!=EOF){
    out.push_back((c*e-b*f)/(a*e-b*d));
    out.push_back((c*d-a*f)/(b*d-a*e));
  }
  for (int i=0;i<out.size();i+=2){
    printf("%f %f\n",round(out[i]*1000)/1000.0,round(out[i+1]*1000)/1000.0);
  }
  return 0;
}

C++: const int tt = 10000;

#include<iostream>
#include<string>
#include<sstream>
using namespace std;

string toStr(int n);
string intToString(int n);

int main() {
  int a, b, c, d, e, f;
  
  while(cin >> a >> b >> c >> d >> e >> f) {
    c = c * tt;
    f = f * tt;

    int det = a * e - b * d;

    int x = ( e * c - b * f) / det;
    int y = (-d * c + a * f) / det;
//    cout << x << y << endl;

    cout << toStr(x) << " " << toStr(y) << endl;
  }
}

string toStr(int n) {
  string pm, val;
  
  if (n < 0) {
    pm = "-";
    n = -n;
  } else {
    pm = "";
  }

  int ipart = n / tt;
  int fpart = (n - ipart * tt) + tt + 5;

  val = pm + intToString(ipart) + "." + intToString(fpart).substr(1, 3);
  return val;
}

string intToString(int n) {
  stringstream ss;
  ss << n;
  return ss.str();
}

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
#define REP(i,N) for(int i = 0; i < (int)N; i++)

int main(){
	double hako[6];
	while(cin >> hako[0]){
		REP(i,5)cin >> hako[i+1];
		cout << (hako[2] - hako[5]*hako[1]/hako[4]) / (hako[0] - hako[3]*hako[1]/hako[4]);
		cout << " ";
		cout << (hako[2] - hako[5]*hako[0]/hako[3]) / (hako[1] - hako[4]*hako[0]/hako[3]);
		cout << endl;
	}
	return 0;
}

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

using namespace std;

int main(){

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

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

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

cout << setiosflags(ios::fixed) << setprecision(3) << x << " " << y << endl;
}
}

C++: #include <stdio.h>
#include <string>
#include <queue>
#include <stack>
#include <set>
#include <iostream>
#include <algorithm>
#include <vector>
#include <list>
#include <deque>
#include <math.h>
using namespace std;
int main()
{
    //freopen("input.txt","r",stdin);
    double a,b,c,d,e,f;
    while(cin>>a>>b>>c>>d>>e>>f)
    {
        double r1=b*f-e*c,r2=b*d-a*e;
        double x=r1/r2;

        double y= (c-a*x)/b;

        printf("%.3lf %.3lf\n",x+0.0000001,y+0.0000001);
    }
    return 0;
}

C++: #include<stdio.h>
#include<math.h>
double sg(double x){
	if ( x > 0.0 ) {
		return floor(x + 0.0005);
	} else {
    	return -0.001 * floor(fabs(x) + 0.0005);
	}
}
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=(((c*d)-(a*f))/((b*d)-(a*e)));
		x=(((c*e)-(b*f))/((a*e)-(b*d)));
		printf("%f %f\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("%.3f %.3f\n",(c*e-b*f)/(a*e-d*b),(c*d-f*a)/(b*d-a*e));
 }
 return 0;
}

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

using namespace std;

#define rep(i, n) for(int i = 0; i < (int)n; ++i)
#define repn(i, n) for(int i = 1; i <= (int)n; ++i)
#define pb push_back
#define lb lower_bound
#define mp make_pair
#define ite iterator
#define max2(x, y) ((x) > (y)) ? (x) : (y)
#define max3(x,y,z) max2((x), max2((y),(z)))
#define max4(v,w,x,y) max2(max2((v),(w)), max2((x),(y)))
#define min2(x, y) ((x) > (y)) ? (y) : (x)
#define min3(x,y,z) min2((x), min2((y),(z)))
#define min4(v,w,x,y) min2(min2((v),(w)), min2((x),(y)))
#define ul unsigned long
#define ull unsigned long long
#define INF 1000000007
#define MOD 1000000007
#define fs first
#define sd second

template<typename T>
bool elem(set<T> st, T val){
	return (st.find(val) != st.end());
}

template<typename T>
void printv(vector<T> vt){
    rep(i, vt.size() - 1)
        cout << vt[i] << " ";
    cout << vt[vt.size() - 1] << endl;
}

typedef vector<int> vint;
typedef vector<ul> vul;
typedef vector<ull> vull;
typedef pair<int, int> pii;


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