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>
#define N 1000000
struct{double a,b,c,d,e,f;}data[N];

int main(){
    int i,L;
    double a,b,c,d,e,f;
    double x,y;
    for(i=0; i<N&&scanf("%d %d %d %d %d %d",data[i].a,data[i].b,data[i].c,data[i].d,data[i].e,data[i].f)!=EOF; i++);
    L=i;
    for(i=0;i<L;i++){
        a=data[i].a; b=data[i].b; c=data[i].c; d=data[i].d; e=data[i].e; f=data[i].f;
        x=(1/(a*e-b*d))*(e*c-b*f);
        y=(1/(a*e-b*d))*(a*f-d*c);
        printf("%.3f %.3f",x,y);
    }
    return 0;
}

C++: #include<stdio.h>

int main(void){
  double a,b,c,d,e,f;
  double x,y;
  
  while(scanf("%d %d %d %d %d %d",&a ,&b ,&c ,&d ,&e ,&f) != EOF){
    x=((double)((c*e-b*f))/(a*e-b*d)*1000)/1000.0;
       y=((double)((d*c-a*f))/(b*d-a*e)*1000)/1000.0;
    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 <vector>
#include <string>
#include <sstream>
#include <iomanip>
#include <cmath>

using namespace std;

void inputData(vector<string>& data_set) {
	string buffer;
	while(getline(std::cin,buffer))
		data_set.push_back(buffer);
}

vector<string> splitString(const string& str, const string& separator = " ") {
	vector<string> ret;

	std::size_t bp, ep;
	bp = ep = 0;
	while((ep = str.find_first_of(separator, bp)) != string::npos){
		if(bp != ep){
			ret.push_back(string(str.begin() + bp, str.begin() + ep));
		}
		bp = ep + 1;
	}

	if(bp <= str.size() - 1){
		ret.push_back(string(str.begin() + bp, str.end()));
	}

	return ret;
}

template <class T>
T convertStringToNumber(const string& str) {
	stringstream ss;
	T ret;

	ss << str;
	ss >> ret;

	return ret;
}



vector<double> parseStringData(const string& data_str) {
	auto buff = splitString(data_str);

	vector<double> ret(buff.size());
	for(int i = 0; i < buff.size(); ++i){
		auto temp = convertStringToNumber<double>(buff[i]);
		ret[i] = temp;
	}

	return ret;
}


void displayAnswer(const vector<double>& data_set) {
	double det = 1.0 / (data_set[0] * data_set[4] - data_set[1] * data_set[3]); 
	double x = det * (data_set[4] * data_set[2] + -data_set[1] * data_set[5]);
	double y = det * (-data_set[3] * data_set[2] + data_set[0] * data_set[5]);

	auto func = [](double n) -> double {
		int buff = static_cast<int>(round(n * 1000));
		if(!abs(buff))
			return abs(buff);
		return buff / 1000.0;
	};

	x = func(x);
	y = func(y);

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


void doAllProcess() {
	vector<string> buffer;
	inputData(buffer);

	for(int i = 0; i < buffer.size(); ++i){
		auto data_set = parseStringData(buffer[i]);
		displayAnswer(data_set);
	}
}


int main() {
	doAllProcess();

	return 0;
}

C++: #include <iostream>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
#include <cmath>
using namespace std;
typedef vector<int> VI;
#define REP( i, m, n ) for ( int i = (int)( m ); i < (int)( n ); ++i )

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    
    vector<vector<double>> equations;

    double a, b, c, d, e, f;
    while (cin >> a >> b >> c >> d >> e >> f) {
        vector<double> tmp = {a, b, c, d, e, f};
        equations.push_back(tmp);
    }

    for (auto t : equations) {
        double x, y;
        t[4] = t[4] / t[3] * t[0] - t[1];
        t[5] = t[5] / t[3] * t[0] - t[2];
        t[1] /= t[0];
        t[2] /= t[0];

        y = t[5] / t[4];
        x = t[2] - t[1] * y;
        
        cout.setf(ios::fixed);
        cout.precision(3);
        cout << x << " " << y << endl;
    }
    
    return 0;
}

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

double* solve_equations(double *a)
{
	// クラメルの公式を用いる
	int data_size=sizeof(a[0]);
	/*cout << "data_size=" << data_size << endl;
	cout << "a=" << a << endl;
	cout << "*(a + data_size*1)=" << *(a + 1) << endl;
	cout << "*(a + data_size*0) * *(a + data_size*4)" << *(a + data_size*0) * *(a + data_size*4) << endl; */
	double z = *(a + 0) * *(a + 4) 
		   - *(a + 1) * *(a + 3);
	double x = *(a + 2) * *(a + 4)
		   -	*(a + 1) * *(a + 5);
	double y = *(a + 0) * *(a + 5)
		   - *(a + 2) * *(a + 3); 
	double ax,ay;
	/*cout << "x=" << x << endl;
	cout << "y=" << y << endl;*/
	ax = pow(z,-1)*x;
	ay = pow(z,-1)*y;
	
	/* cout << ax << endl;
	cout << ay << endl; */
	double ans[2] = {ax,ay};
	return ans;
}

int main()
{
	double n[6];
	double s;
	int i=0;
	while (cin >> s){
		if (i == 5){
			n[i]=s;
			/* for (int j=0;j<=5;j++)
			{
				cout << "n[" << j << "]=" << n[j] << endl;
			}*/
			double* an;
			an = solve_equations(n);
			/* printf("%.3lf",*(an+0));
			cout << " " << endl;
			printf("%.3lf",*(an+1)); */
			if (an[1] == 0)
				cout << fixed << setprecision(3) << an[0] << " " << 0.000 << endl;
			else if(an[0] == 0)
				cout << fixed << setprecision(3) << 0.000 << " " << an[1] << endl;
			else
				cout << fixed << setprecision(3) << an[0] << " " << an[1] << endl;

			i = 0;}
		else{
			n[i]=s;
			i++;
		}
	}
	return 0;
			// cout << l[0]  endl;
}

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

C++: #include<bits/stdc++.h>
#define loop(i, a, b) for(int i = a; i < b; i++) 
#define rep(i, a) loop(i, 0, a)
using namespace std;
const int MOD = 1000000007;
const int inf = 1e8;
using vi = vector <int>;
using vvi = vector <vi>;
using vc = vector <char>;
using vvc = vector <vc>;
using vs = vector <string>;
using vvs = vector <vs>;
//g++ -std==c++14
//setprecision(10)
double a, b, c, d, e, f;

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

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(){
  double m[2][2],x[2],mi[2][2],det;
  while(cin >>m[0][0]>>m[0][1]>>x[0]>>m[1][0]>>m[1][1]>>x[1]){
    det = m[0][0]*m[1][1]-m[0][1]*m[1][0];
    mi[0][0] = m[1][1]/det;
    mi[0][1] = -m[0][1]/det;
    mi[1][0] = -m[1][0]/det;
    mi[1][1] = m[0][0]/det;
    printf("%.3lf %.3lf\n",x[0]*mi[0][0]+x[1]*mi[0][1],x[0]*mi[1][0]+x[1]*mi[1][1]);
  }
  return 0;
}

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

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

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

    y=(c*d-a*f)/(b*d-a*e);

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

    cout<<fixed;
    cout<<setprecision(3)<<x<<" "<<setprecision(3)<<y<<endl;
  }
  
  return 0;
}