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)
		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;

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

    while(cin >> a >> b >> c >> d >> e >> f) {
        double num1 = a,num2 = d, x, y;
        a *= num2; b *= num2; c *= num2;
        d *= num1; e *= num1; f *= num1;

        num1 = b - e; num2 = c - f;
        y = num2 / num1; x = (c - b*y) / a;

        x *= 10000; y *= 10000;
        num = (int)x; x = (double)num;
        num = (int)y; y = (double)num;
        num1 = (int)x % 10; num2 = (int)y % 10;

        x /= 10000; y /= 10000;

        if (num1 > 4) {
            x += 0.001;
        }
        if (num2 > 4) {
            y += 0.001;
        }

        printf("%0.3f %0.3f\n", x, y);

    }
    
    return 0;
}

C++: //08
#include<iostream>
#include<iomanip>
#include<cmath>

using namespace std;

int main(){
  for(double a,b,c,d,e,f;cin>>a>>b>>c>>d>>e>>f;){
    double x=(c*e-f*b)/(a*e-d*b);
    double y=(f-d*x)/e;
    if(fabs(x)<1e-4){
      x=0;
    }
    if(fabs(y)<1e-4){
      y=0;
    }
    cout<<fixed<<setprecision(3)<<x<<' '<<y<<endl;
  }
  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-f*a)/(b*d-e*a);
        x=(c*e-f*b)/(a*e-d*b);
        cout<<fixed<<setprecision(3)<<x+0.0005<<" "<<y+0.0005<<endl;
    }
}

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){
    y = (double)(a*f-d*c) / (a*e - b*d);
    x = (c-b*y) / a;
    cout << setprecision(3) << setiosflags(ios::fixed) << x << ' ' << setprecision(3) << setiosflags(ios::fixed) << y << endl;
  }
  return 0;
}

C++: #include <iostream>
#include <stdio.h>
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 = (f-d*x)/e;
		if(x == -0) x == 0;
		if(y == -0) y == 0;
		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( scanf(" %lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF ){
		if(b==0){
			x=c/a;
			y=(f-d*x)/e;
		}
		else{
			if(e==0){
				x=f/d;
				y=(c-a*x)/b;
			}
			else{
				x=(b*f-c*e)/(b*d-a*e);
				y=(c-a*x)/b;
			}
		}
		
		if(x==0) x=0;
		if(y==0) y=0;
	
		printf("%.3lf %.3lf\n", x, y);
	}

	return 0;
}

C++: #include "iostream"
#include "iomanip"
using namespace std;

double 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*e-b*f)/(a*e-b*d);
		   cout<<fixed<<setprecision(3)<<x<<" "<<y<<endl;
	    }
	return 0;
}

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

}

C++: #include<iostream>
#include<iomanip>
#include <math.h>
double    round4(double src, int n){
	double dst;
	dst = src * pow(10, -n - 1);
	dst = (double)(int)(dst + 0.5);
	return    dst * pow(10, n + 1);
}

int main(){

	double a, b, c, d, e, f;
	double x, y;
	while (std::cin >> a >> b >> c >> d >> e >> f){
		if (a*d<0){
			d = -d;
			e = -e;
			f = -f;
		}

		x = (c - b*(c - f*a / d) / (b - e*a / d)) / a;
		y = (c - f*a / d) / (b - e*a / d);
		if (x == 0)x = 0;
		if (y == 0)y = 0;
		round4(x, 4);
		round4(y, 4);
		std::cout<<std::fixed<<std::setprecision(4)  << x << " " << y << std::endl;
	}
	return 0;
	
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define mp make_pair
#define it ::iterator
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double ESP=1e-10;
using namespace std;
int main(){
  double a,b,c,d,e,f;
  while(cin>>a){
    cin>>b>>c>>d>>e>>f;
    double x=(c*e-b*f)/(a*e-b*d);
    double y=(f-d*x)/e;
    if(x==0)x=0;
    if(y==0)y=0;
    printf("%.10f %.10f\n",x,y);
  }
}

    
    /*
      ey=f-dx
      y=(f-dx)/e
      ax+b(f-dx)/e=c
      aex+df-bdx=ce
      (ae-bd)x=ce-df
      x=(ce-df)/(ae-bd)

  y=(f-dx)/e
  y=(f



a b  x  c
d e  y  f

x  c  e -b
y  f  -d a  /(ae-bd)*/

C++: #include <stdio.h>

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

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

using namespace std;

int main() {
    
    double a, b, c, d, e, f;
    while (cin >> a >> b >> c >> d >> e >> f) {
        double x = (e * c - b * f) / (e * a - b * d);
        double y = (d * c - a * f) / (d * b - a * e);
        
        printf("%.3f %.3f\n", floor(x * 1000 + 0.5) / 1000, floor(y * 1000 + 0.5) / 1000);
    }
    
    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 = (d*c - a*f)/(d*b - a*e);
		x = (c-b*y)/a;
	printf("%0.3f %0.3f\n",x+0.00000001,y+0.00000001);
	}
}

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

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

using namespace std;

int main(){
	double a,b,c,d,e,f;
	while(cin.eof()==false){
//		break;
	a=10000;
	cin >> a >> b >> c >> d >> e >> f;
	if (a==10000){
		break;
	}

	double under = a*e-b*d;
//	cout << (c*e-b*f)/under << " " << (a*f-c*d)/under << endl;
	printf("%.3f %.3f\n",(c*e-b*f)/under,(a*f-c*d)/under);
	}
}

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

int main()
{
	double 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);
		if(x*10000%10>=5) x=x+0.001; 
		if(y*10000%10>=5) y=y+0.001; 
		printf("%.3lf %.3lf\n",x,y);
	}
	return 0;
}