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<bits/stdc++.h>
using namespace std;

const double EPS=1e-8;
typedef vector<double>vec;
typedef vector<vec>mat;

/// Ax=b
vec gauss_jordan(const mat& A,const vec& b){
    int n=A.size();
    mat B(n,vec(n+1));

    for(int i=0;i<n;i++)
        for(int j=0;j<n;j++)B[i][j]=A[i][j];

    for(int i=0;i<n;i++)B[i][n]=b[i];

    for(int i=0;i<n;i++){
        int pivot=i;
        for(int j=i+1;j<n;j++){
            if(abs(B[j][i])<abs(B[pivot][i]))pivot=j;
        }
        swap(B[i],B[pivot]);
        //if(abs(B[i][i])<EPS)return vec();

        for(int j=i+1;j<=n;j++)B[i][j]/=B[i][i];
        for(int j=0;j<n;j++){
            if(i==j)continue;
            for(int k=i+1;k<=n;k++)B[j][k]-=B[j][i]*B[i][k];
        }
    }

    vec x(n);
    for(int i=0;i<n;i++)x[i]=B[i][n];
    return x;
}

int main(){
    mat A(2,vec(2));
    vec b(2);
    while(true){
        for(int i=0;i<2;i++){
            if(scanf("%lf%lf%lf",&A[i][0],&A[i][1],&b[i])==EOF)return 0;
        }

        vec x=gauss_jordan(A,b);
        printf("%.3lf %.3lf\n",x[0],x[1]);
    }
    return 0;
}

C++: #include<stdio.h>
int main()
{
	int X,Y;
	double a,b,c,d,e,f,x=0,y=0;
	while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!=EOF)
	{
		y=(c*d-f*a)/(b*d-e*a);
		x=(c*e-f*b)/(a*e-d*b);
		if(x>0)
			x+=0.0005;
		if(x<0)
			x-=0.0005;
		if(y>0)	
			y+=0.0005;
		if(y<0)
			y-=0.0005;
		X=x*1000;
		Y=y*1000;
		x=X/1000;
		y=Y/1000;
		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){
		int d1[3]={a,b,c};
		int d2[3]={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>
using namespace std;
int main()
{
  double a,b,c,d,e,f;
  while( cin >> a >> b >> c >> d >> e >> f ){
    double x = (c/b - f/e) / (a/b - d/e);
    double y = (c - a*x) / b;
    if(x == -0) x = 0;
    if(y == -0) y = 0;
    cout << showpoint << x << " " << y << endl;
  }
}

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

int main() {
  double a,b,c,d,e,f,ad,bd,ae,cd,af,x,y;
  while(cin>>a>>b>>c>>d>>e>>f){ 
    ad=a*d;
    bd=b*d;
    cd=c*d;
    ae=a*e;
    af=a*f;
    y=(cd-af)/(bd-ae);
    x=(c-b*((cd-af)/(bd-ae)))/a;
    cout<<fixed<<setprecision(3)<<x<<' '<<y<<endl;
  }
  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<int> parseStringData(const string& data_str) {
	auto buff = splitString(data_str);

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

	return ret;
}


void displayAnswer(const vector<int>& 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]);

	x = round(x * 1000) / 1000.0;
	y = round(y * 1000) / 1000.0;

	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 <cstdio>

using namespace std;

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

int main() {
	int a, b, c, d, e, f;
	while (cin >> a >> b >> c >> d >> e >> f) {
		solve(a,b,c,d,e,f);
	}
	return 0;
}

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

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

C++: #include<stdio.h>
int main(){
    double a,b,c,d,e,f;
    double db,dc,ae,af;
    double ny,n;
    double y;
    double x;
    while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)!=EOF){
        db=d*b;
        dc=d*c;
        ae=a*e;
        af=a*f;
        ny=db-ae;
        n=dc-af;
        y=n/ny;
        x=(c-y*b)/a;
        printf("%lf %lf\n",x,y);
    }
    return 0;
}

C++: 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("%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,m,n;

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

  m = a;
  n = d; 

  a *= n;
  b *= n;
  c *= n;

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

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

  if(x==0)
    x = 0;
  if(y==0)
    y = 0;

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

  return 0;
}

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

float marume(float x, float N){
	x = x*pow(10,N);
	x = int(x+0.5-(x<0));
	return x/pow(10,N);
}

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

C++: #include<stdio.h>
int main(){int a,b,c,d,e,f;while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)!=-1){double x,y; y=(double)(a*f-d*c)/(a*e-b*d);x=(double)(c-b*y)/a;printf("%.3f %.3f\n",x+0.0005,y+0.0005);}return 0;}

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

double shisyagonyu(double x){
  x += 0.0005;
  return x;
}

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

  while(std::cin >>a>>b>>c>>d>>e>>f){
    x = shisyagonyu((c*e-b*f)/(a*e-b*d));
    y = shisyagonyu((a*f-c*d)/(a*e-b*d));

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