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(){
	int i = 0;
	double a, b, c, d, e, f;
	double x[2], y[2];
	while (i<=1){
		cin >> a >> b >> c >> d >> e >> f;
		x[i] = (c*e - f*b) / (a*e - b*d);
		y[i] = (c - a*x[i])/b;
		i++;
	}
	for (int j = 0; j < 2; j++){
		cout << fixed << setprecision(3) << x[j]+0.00001 << " " << setprecision(3) << y[j] +0.00001<< '\n';
	}

	return 0;
}

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

int main()
{
	for (double a, b, c, d, e, f; cin >> a >> b >> c >> d >> e >> f; cout << fixed << setprecision(4) << ((c*e - b*f) != 0 ? (c*e - b*f) / (a*e - b*d) +0.00005 : 0.0000) << ' ' << ((a*f - c*d) != 0 ? (a*f - c*d) / (a*e - b*d) + 0.00005 : 0.0000) << endl);
	return 0;
}

C++: #include <math.h>
#include <iostream>
#include <ios>
#include <iomanip>
#include <algorithm>
#include <functional>
#include <string>

#define YES "YES"
#define NO "NO"
#define space ' '

using namespace std;

void func();

int main(void)
{
	
	func();

	return 0;
}

// using matrix	?????????????????´??????
void func()
{
	int a, b, c, d, e, f;
	double x, y;

	while (cin >> a >> b >> c >> d >> e >> f, !cin.eof()){


		cout << fixed << setprecision(3);
		if ((a*e - d*b) == 0)
		{
			cout << 0 << space << 0 << endl;
		}
		else
		{
			x = (e*c - b*f) / (a*e - d*b);
			y = (-d*c + a*f) / (a*e - d*b);

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

			cout << x << space << y << endl;
			
		}
		cout << dec;
	}
}

C++: #include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

int main()
{
    const int TMP = 10000;
    for(;;){
        int a,b,c,d,e,f;
        if(!(cin >> a >> b >> c >> d >> e >> f))
            return 0;
        int x = TMP * (c*e - b*f) / (a*e - b*d);
        int y = TMP * (c*d - a*f) / (b*d - a*e);
        int xSign = (x>=0? 1:-1);
        int ySign = (y>=0? 1:-1);
        x = abs(x);
        y = abs(y);

        if(x % 10 >= 5)
            x += 10;
        x /= 10;
        if(xSign == -1)
            cout << '-';
        printf("%d.%04d ", x/TMP, x%TMP);

        if(y % 10 >= 5)
            y += 10;
        y /= 10;
        if(ySign == -1)
            cout << '-';
        printf("%d.%04d\n", y/TMP, y%TMP);
    }
}

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

using namespace std;


int main()
{
	int a,b,c,d,e,f;
	double def;
	double x,y;
	while(scanf("%d %d %d %d %d %d",&a, &b, &c, &d, &e, &f) != EOF){
		if((a * e - b * d) != 0){
			def = 1 / (double)(a * e - b * d);
		}else{
			printf("NA\n");
			continue;
		}
		x = def * (double)(e * c - b * f);
		y = def * (double)(a * f - d * c);
		if(abs(x) < 0.0005){
			x = 0.000;
		}
		if(abs(y) < 0.0005){
			y = 0.000;
		}
		printf("%.3lf %.3lf\n",x,y);
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main()
{
	return 0;
}

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

int main(void){
	double x,y;
	int a=0,b=0,c=0,d=0,e=0,f=0,i=0,j;
    
    while(scanf("%d %d %d %d %d %d\n",&a,&b,&c,&d,&e,&f) != EOF)
	{
		x = (c * e -b * f) / (a * e - b * d);
	    y = ((c - a * x) / b);

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

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

C++: #include <bits/stdc++.h>
using namespace std;

int main(void) {
    double a, b, c, d, e, f;
    while(cin >> a >> b >> c >> d >> e >> f) {
        double y = ((d*c-a*f) / (double)(b*d-a*e));
        double x = (c - b*y) / (double)a;
        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)
	{
		x=(c*e-b*f)/(a*e-b*d);
		y=(c*d-a*f)/(b*d-a*e);
		if(-0.0004<x&&x<=0)x=0;
		if(-0.0004<y&&y<=0)y=0;
		printf("%.3lf %.3lf\n",x,y);
	}
	return 0;
}

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

#define N 1024

int main()
{
	char buff[N];
	
	while (NULL != fgets(buff, N, stdin))
	{
		double a, b, c, d, e, f;
		sscanf(buff, "%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f);
		
		double dd = a * e - b * d;
		double x = ( e * c - b * f ) / dd;
		double y = ( - d * c + a * f ) / dd;
		
		x = x == -0 ? +0 : x;
		y = y == -0 ? +0 : y;
		
		printf("%.3f %.3f\n", x, y);
	}
	return 0;
}

C++: #include <iostream>
#include <string>
#include <map>
#include <vector>
#include <deque>
#include <algorithm>
#include <cmath>
#define rep(i, a, b) for(int i = a; i < b; i++)
using namespace std;
typedef long long ll;
int a, b, c, d, e, f;

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

C++: #include<bits/stdc++.h>
using namespace std;

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

	//小数点以下４桁で四捨五入して表示
	cout << fixed << setprecision(3) << x << " " << y << endl;

	return 0;
}

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

int main()
{
    int a, b, c, d, e, f;
    while (scanf("%d", &a) != EOF) {
        scanf("%d", &b);
        scanf("%d", &c);
        scanf("%d", &d);
        scanf("%d", &e);
        scanf("%d", &f);
        printf("%.3f ", (float) (c*e - b*f) / (a*e - b*d ));
        printf("%.3f\n", (float) (- c*d + a*f) / (a*e - b*d ));
        
    }
    return 0;
}

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

int main()
{
	double a, b, c, d, e, f, x, y;			// ax + by = c 
											// dx + ey = f
	while (cin >> a >> b >> c >> d >> e >> f)
	{
		x = (double)((c*e - b*f) / (a*e - b*d));
		y = (double)(( - (c*d) + a*f) / (a*e - b*d));

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

C++: #include<stdio.h>
#include<math.h>
int main(void){
    double a,b,c,d,e,f,A,x,y,X,Y,Z;

    while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)!=EOF){


    Y=a*e-b*d,Z=f*a-c*d;
    y=Z/Y;

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

   printf("%.3lf %.3lf\n",x,y);
    }
   //printf("\na%lf\nb%lf\nc%lf\nd%lf\ne%lf\nf%lf\n%lf\n%lf",a,b,c,d,e,f,Y,Z);

    return 0;
}