Go: package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)

func main() {
	sc.Split(bufio.ScanWords)
	defer out.Flush()
	for {
		data := nextInts(6)
		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 float64(((c * e) - (b * f)) / ((a * e) - (b * d)))
}

func GetY(a, b, c, d, e, f float64) float64 {
	return float64(((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 <iomanip>

using namespace std;

int main(void){
    int a,b,c,d,e,f;
    double ansX,ansY;
    while(std::cin >> a >> b >> c >> d >> e >> f){
        ansX = (c*e - b*f) / (a*e - b*d);
        ansX *= 1000;
        if(ansX > 0) ansX += 0.5;
        else ansX -= 0.5;
        ansX = int(ansX);
        ansX /= 1000;
        
        ansY = (a*f - c*d) / (a*e - b*d);
        ansY *= 1000;
        if(ansY > 0) ansY += 0.5;
        else ansY -= 0.5;
        ansY = int(ansY);
        ansY /= 1000;
        
        std::cout <<fixed << setprecision(3) << ansX << " " << fixed << setprecision(3)<<ansY << std::endl;
    }
    
}

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

int main() {
	double x,y,a,b,c,d,e,f;
	while(6 == scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)){
		x = (-b*f+e*c)/(a*e-b*d);
		y = (f-d*x)/e;
		if(x == 0){
        	x = 0.000;
	    }
		if(y == 0){
        	y = 0.000;
		}

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

C++: #include <iostream>			//std::cout, std::cin
#include <string>			//std::string,std::to_string(C++11)
#include <vector>			//std::vector
#include <valarray>			//std::valarray
#include <algorithm>		//std::sort
#include <ctime>			//localtime_s
#include <cstdlib>			//abs
#include <cmath>			//abs,std::pow,sqrt,sin,cos,round,floor,ceil
#include <fstream>			//std::ifstream,std::ofstream
#include <iomanip>			//std::setprecision,std::setw,std::setfill
#include <random>			//std::random(C++11)
#include <numeric>			//std::accumulate
#include <functional>		//std::greater
#include <chrono>			//std::chrono(C++11)
#include <bitset>			//std::bitset
#include <queue>			//std::queue

const static double	de_PI	= 3.14159265358979323846;
const static int	de_MOD	= 1000000007;
const static int	de_MAX	= 999999999;

int main(void) {

	//std::ifstream in("123.txt");	std::cin.rdbuf(in.rdbuf());
	//std::ofstream ofs("456.csv");
	//std::chrono::system_clock::time_point t_st = std::chrono::system_clock::now();

	double a = 0, b = 0, c = 0, d = 0, e = 0, f = 0;
	std::vector<double> X, Y;

	while (std::cin >> a) {
		std::cin >> b >> c >> d >> e >> f;
		X.push_back((b*f - c*e) / (b*d - a*e));
		Y.push_back((a*f - c*d) / (a*e - b*d));
	}

	for (unsigned int i = 0; i < X.size(); i++) {
		std::cout << std::fixed << std::setprecision(3) << X[i] << " " << Y[i] << std::endl;
	}

	//std::chrono::system_clock::time_point t_ed = std::chrono::system_clock::now();
	//std::cout << std::chrono::duration_cast<std::chrono::milliseconds>(t_ed - t_st).count() << "ms" << std::endl;

}

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

#define MAX 256

int main(void){

	double a = 0, b = 0, c = 0, d = 0, e = 0, f = 0;
	double ansx[MAX], ansy[MAX];

	for (int i = 0; i < MAX; i++){
		ansx[i] = 0;
		ansy[i] = 0;
	}


	int i = 0;

	while (scanf("%lf%lf%lf%lf%lf%lf%lf", &a,&b,&c,&d,&e,&f) != EOF){
		ansx[i] = (c*e - b*f) / (a*e - b*d);
		ansy[i] = (c*d - a*f) / (b*d - a*e);
		i++;
	}

	for (int j = 0; j < i; j++){
		printf("%.3lf %.3lf\n", ansx[j], ansy[j]);
	}

	return 0;
}

C++: #include<iostream>
#include<iomanip>
#include<cmath>
double r(double x,int n){
  for(int i=0;i<n;i++) x *= 10;
  x = floor(x+0.5);
  for(int i=0;i<n;i++) x /= 10;
  return x;
}
using namespace std;
int main(){
  double a,b,c,d,e,f,x,y,dk;
  int n;
  while(cin>>a>>b>>c>>d>>e>>f){
    /*a *= d;
    b *= d;
    c *= d;//方程式にd倍
    dk = d;
    d *= (a/dk);
    e *= (a/dk);
    f *= (a/dk);//方程式にa倍
    y = (c-f)/(b-e);
    a /= d;
    b /= d;
    c /= d;//元の方程式
    d /= a;
    e /= a;
    f /= a;//元の方程式*/
    y = (c*d-a*f)/(b*d-a*e);
    x = (e*c-f*b)/(a*e-b*d);
    cout << fixed << setprecision(3) << r(x,3) << ' ' << r(y,4) << endl;
  }
  return 0;
}

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

int main() {
	double a, b, c, d, e, f;
	double x, y;
	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;
	}
	return 0;
}

C++: #define _USE_MATH_DEFINES
#include <iostream> 
#include <iomanip>
#include <string>
#include <map>
#include <math.h>
#include <vector>
#include <algorithm>
using namespace std; 
int main(){
	double a, b, c, d, e, f, x, y;
	while(cin >> a >> b >> c >> d >> e >> f){
		x = (c*e - f*b) / (a*e - d*b);
		y = (c*d - f*a) / (b*d - e*a);
		std::cout << std::fixed;
		std::cout << std::setprecision(3) << x << " " << y << endl;
	}
	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){
		cin>>b;
		cin>>c;
		cin>>d;
		cin>>e;
		cin>>f;

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

		if(fabs(x)<1e-3 && fabs(y)<1e-3){
			printf("%.3f %.3f\n",fabs(x),fabs(y));
		}
		else if(fabs(x)<1e-3){
			printf("%.3f %.3f\n",fabs(x),y);
		}
		else if(fabs(y)<1e-3){
			printf("%.3f %.3f\n",x,fabs(y));
		}
		else{
			printf("%.3f %.3f\n",x,y);
		}

	}

	return 0;
}

C++: #include <iostream>
#include <cstring>
#include <cstdio>
using namespace std;
 
int main() {
	int a,b,c,d,e,f,q,s;
	double  x,y;
	while(cin >> a>>b>>c>>d>>e>>f){
		x = (c*e-f*b)/(a*e-d*b);
		y = (a*f-d*c)/(a*e-d*b);
		printf("%.3f %.3f\n",x,y);
	}
}

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

  return 0;
}

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

using namespace std;

int main(){
    double a, b, c, d, e, f;
    double x, y;
    while(cin >> a >> b >> c >> d >> e >> f) {
        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;
        x = (x == -0.0) ? 0.000 : x;
        y = (y == -0.0) ? 0.000 : y;
        cout << fixed << setprecision(3);
        cout << x << " " << y << endl;
    }
    return 0;
}

C++: #include <iostream>
#include <math.h>
#include <stdio.h>
#include <string>
#include <string.h>
#include <algorithm>
#include <cmath>
#include <limits>
#include <sstream>
#include <iomanip>

using namespace std;

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

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

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