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 <iostream>
#include <cstdio>

using namespace std;

/*
aX+bY=c
dX+eY=f
*/

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 <stdio.h>
#include <math.h>

int main(){
  int a, b, c, d, e, f;
  scanf("%d ",&a);
  scanf("%d ",&b);
  scanf("%d ",&c);
  scanf("%d ",&d);
  scanf("%d ",&e);
  scanf("%d ",&f);
  
  double x, y;
  x = (double)(c*e-b*f) / (double)(a*e-b*d);
  y = (double)(a*f-c*d) / (double)(a*e-b*d);
  x = (double)round(x*10000.0) / 10000.0;
  y = (double)round(y*10000.0) / 10000.0;
  printf("%.3f %.3f\n", x, y);
  
  return 0;
}

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

C++: #include<iostream>
#include<stdio.h>
#include<stdlib.h>
#include<math.h>

#define     MAX_LENGTH     255

using namespace std;

double num_abs_round(const double,const int);

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

	while (cin >> a >> b >> c >> d >> e >> f){
		// Det(係数行列) を計算
		det = (a * e) - (b * d);
		// Det(係数行列) ≠ 0 かどうかをチェック
		if(det == 0){
			cerr << "エラー：この連立方程式の解は存在しないか一意に定まらない" << endl;
			return -1;
		}

		// 解を求める
		x = ((e * c) - (b * f)) / det;
		y = ((a * f) - (d * c)) / det;

		// 整形
		x = num_abs_round(x,3);
		y = num_abs_round(y,3);

		// 表示する
		printf("%.3f %.3f\n",x,y);
	}

	return 0;
}

double num_abs_round(const double num,const int p){
	char num_str[MAX_LENGTH];
	char rtn_str[MAX_LENGTH];
	int i,j;
	bool flag = false;
	double rtn;

	// rtn_str の初期化
	for(i=0;i < ((int)(MAX_LENGTH));i++){
		rtn_str[i] = '\0';
	}

	// 数値を文字列に変換
	sprintf(num_str,"%f\0",num);

	// 符号の確認
	if(num_str[0] == '-'){
		j = 1;
		rtn_str[0] = '0';
	}else{
		j = 0;
	}

	// 小数点の検索 (num_str[j] に '.' が入っている)
	for(;num_str[j] != '.';j++){
		// 小数点がなければ num をそのまま返す
		if(num_str[j] == '\0'){
			return num;
		}
		// rtn_str に num_str をコピー
		rtn_str[j] = num_str[j];
	}

	// '.'をコピー
	rtn_str[j] = '.';

	// 小数点以下 (p + 1) 桁までをコピー
	for(i=1;i <= (p + 1);i++){
		// num が (p + 1) 桁未満だったら num をそのまま返す
		if(num_str[(j + i)] == '\0'){
			return num;
		}
		// rtn_str に num_str をコピー
		rtn_str[(j + i)] = num_str[(j + i)];
	}

	// 小数点以下 (p + 1) 桁を四捨五入
	if(((rtn_str[(j + p + 1)] - '0') >= 0) && ((rtn_str[(j + p + 1)] - '0') <= 4)){
		rtn_str[(j + p + 1)] = '\0';
	}else if((((int)(rtn_str[(j + p + 1)] - '0')) >= 5) && (((int)(rtn_str[(j + p + 1)] - '0')) <= 9)){
		flag = true;
		rtn_str[(j + p + 1)] = '\0';
	}else{
		return 0;
	}

	// rtn_str を数値に変換
	rtn = atof(rtn_str);

	// 五入の場合の処理
	if(flag == true){
		rtn += pow((double)10,(double)(p * (-1)));
	}

	return rtn;
}

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>
#include<algorithm>
#include<string>
#include<math.h>
using namespace std;

int main(){
	double a, b, c, d, e, f;
	double x, y;
	double A, B, C;
	const double p = 0.00000001;

	while (cin >> a >> b >> c >> d >> e >> f){
		A = (a*e) - (b*d);
		B = (c*e) - (b*f);
		C = (a*f) - (c*d);

		x = B / A;
		y = C / A;
		
		if (abs(x) < p) x = 0;
		if (abs(y) < p) y = 0;

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

C++: #include <iostream>
#include <iomanip>
using namespace std;
int main(){
    double a,b,c,d,e,f,x,y;
    cin>>a>>b>>c>>d>>e>>f;
    y=(c*d-f*a)/(b*d-e*a);
    x=(c*e-f*b)/(a*e-d*b);
    cout<<fixed<<setprecision(3)<<x<<" "<<y<<endl;
    
}

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

int main(void)
{
	// ax+by=c,dx+ey=f => ax+by=c,-(a/d)*dx+-(a/d)*ey=-(a/d)*f => ax+by=c,-ax-aey/d=-af/d => by-aey/d=c-af/d => (b-ae/d)y = c-af/d => y=(c-af/d)/(b-ae/d)
	// ax+by=c, ax=c-by, x=(c-by)/a
	
	signed int a, b, c, d, e, f;
	double x, y;
	
	do
	{
		if(std::cin >> a, !std::cin) break;
		std::cin >> b >> c >> d >> e >> f;
		y = (c-a*f/(double)d)/(b-a*e/(double)d);
		x = (c-b*y)/(double)a;
		printf("%.3lf %.3lf\n", x, y);
	} while(true);

	return 0;
}

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

using namespace std;

int main(void)
{
	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;
		
		if(x == -0)
		x = 0;
		if(y == -0)
		y = 0;
		
		printf("%.3f %.3f\n", x, y);
	}
	return 0;
}

C++: #include <iostream>
#include <iomanip>
using namespace std;
int main() {
	double a, b, c, d, e, f;
	while (cin >> a >> b >> c >> d >> e >> f)
		cout << fixed << setprecision(3) << (c * e - b * f) / (a * e - b * d) + 0.00001 << ' ' << (c * d - a * f) / (b * d - a * e) + 0.00001 << endl;
}

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

using namespace std;
int a,b,c,d,e,f;
int main(){
	while(cin>>a>>b>>c>>d>>e>>f){
		double x=(c*e-b*f)/(a*e-b*d);
		double y=(c*d-a*f)/(b*d-a*e);
		printf("%.3f %.3f??\\n",x,y);
	}
  return 0;
}

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

using namespace std;

int main() {

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

	while(cin >> a >> b >> c >> d >> e >> f) {
		y=(a*f-c*d)/(a*e-b*d);
		x=(c-b*y)/a;
		printf("%.3f %.3f\n", x, y);
	}

	return 0;

}

C++: #include <bits/stdc++.h>
using namespace std;
using uint = unsigned int;
using lint = long long int;
using ulint = unsigned long long int;
template<class T = int> using V = vector<T>;
template<class T = int> using VV = V< V<T> >;
template<class T, class U> void assign(V<T>& v, int n, const U& a) { v.assign(n, a); }
template<class T, class... Args> void assign(V<T>& v, int n, const Args&... args) { v.resize(n); for (auto&& e : v) assign(e, args...); }


V<string> split(const string& s, char c) {
  V<string> res;
  stringstream ss(s);
  string t;
  while (getline(ss, t, c)) res.push_back(t);
  return res;
}

int main() {
  cin.tie(nullptr); ios_base::sync_with_stdio(false);
  string s;
  while (getline(cin, s)) {
    auto ss = split(s, ' ');
    double a = stod(ss[0]);
    double b = stod(ss[1]);
    double c = stod(ss[2]);
    double d = stod(ss[3]);
    double e = stod(ss[4]);
    double f = stod(ss[5]);
    double x = (c * e - f * b) / (a * e - d * b);
    double y = (c * d - f * a) / (b * d - e * a);
    cout << fixed << setprecision(3) << x << ' ' << y << '\n';
  }
}