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++: //
//  main.cpp
//  b
//
//  Created by h3037178 on 2017/07/31.
//  Copyright ?? 2017??´ ?????£?????????. All rights reserved.
//

#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;
        if(e){
            y=(f-d*x)/e;
        }else{
            y=(c-a*x)/b;
        }
        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>
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*e)/(b*d-a*e);
x=(c-b*y)/a;
cout<<setprecision(3)<<x<<y<<endl;}
return 0;}

C++: #include <iostream>
using namespace std;
int main(){
	double a,b,c,d,e,f,g;
	double x,y;
	while(cin>>a>>b>>c>>d>>e>>f){
		g=a*e-b*d;
		x=(c*e-b*f)/g;if(!x)x=0;
		y=(a*f-c*d)/g;if(!y)y=0;
		printf("%.3f %.3f",x,y);
	}
}

C++: #include<stdio.h>
#include <math.h>
int main()
{
int x1, y1;
double a,b,c,d,m,n,x,y;

while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&m,&c,&d,&n)!=EOF){
x=1000*(d*m-b*n)/(a*d-b*c);
y=1000*(a*n-c*m)/(a*d-b*c);
x1=x;
y1=y;
x = (double)x1/1000;
y = (double)y1/1000;
printf("%.3lf %.3lf\n", x, y);
}
return 0;
}

C++: #include<cstdio>
int main(void)
{
	int a,b,c,d,e,f;
	float x,y;
	for(int f1=0;f1<2;f1++)
	{
		scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f);
		y=(a*f-d*c)/((-d)*b+a*e);
		x=(c-b*y)/a;
		printf("%.3f %.3f\n",x,y);
	}
	return 0;
}

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

using namespace std;

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

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

#define MAX 256

int main(void){

	float a, b, c, d, e, f;
	float ansx[MAX], ansy[MAX];

	int i = 0;

	while (scanf("%f%f%f%f%f%f%f", &a,&b,&c,&d,&e,&f) != EOF){
		if (a*e != b*d){
			ansx[i] = (c*e - b*f) / (a*e - b*d);
			ansy[i] = (c*d - a*f) / (b*d - a*e);
			if ((int)(ansx[i] * 10000) % 10 > 4){
				ansx[i] += 0.001;
			}
		}
		i++;
	}

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

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

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

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

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

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

using namespace std;

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

	cin >> a >> b >> c >> d >> e >> f;

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

	cout << fixed << setprecision(3) << x << " " << y << endl;
	//printf("%.3f %.3f\n", x, y);
}

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

int main() {
	double a, b, c, d, e, f,A,B,D,E;
	while (cin >> a >> b >> c >> d >> e >> f) {
		A = e / (a*e - b*d);
		B = -b / (a*e - b*d);
		D = -d / (a*e - b*d);
		E = a / (a*e - b*d); 
		a = A*c + B*f;
		a *= 1000;
		if(a>=0)a += 0.5;
		else a -= 0.5;
		a = int(a);
		a /= 1000;
		b = D*c + E*f;
		b *= 1000;
		if (b >= 0)b += 0.5;
		else b -= 0.5;
		b = int(b);
		b /= 1000;
		cout << fixed << setprecision(3) << a << " " << b << endl;
	}
	return 0;
}

C++: #include<stdio.h>

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

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

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

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

int main()
{
    int a,b,c,d,e,f,t,u,v;
    vector<int> x(0),y(0);
    while (cin>>a>>b>>c>>d>>e>>f)
    {
        x.push_back(0);
        y.push_back(0);
        t=a; u=b; v=c;
        a*=d;  b*=d; c*=d;
        d*=t; e*=t; f*=t;
        y[y.size()-1]=(c-f)/(b-e);
        x[x.size()-1]=(v-u*y[y.size()-1])/t;
    }
    for (int i=0; i<x.size(); i++)
    {
        cout<<x[i]<<".000 "<<y[i]<<".000\n";
    }
    return 0;
}

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

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

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

	return 0;
}

C++: #include<iostream>
#include<stdio.h>
using namespace std;
main(){
  double a,b,c,d,e,f;
  double x=0,y=0;
  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-b*y)/a;
	printf("%.3f %.3f\n",x,y);
  }
}

C++: #include <stdio.h>

int main(){
	int a,b,c,d,e,f;
	double x,y;
	while((scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f))!=EOF){

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

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

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

using namespace std;

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

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

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

int main()
{
	double x[2],y[2],z[2];
	double X,Y;

	while(cin >> x[0] >> y[0] >> z[0] >> x[1] >> y[1] >> z[1]){
		y[0] *= x[1];	z[0] *= x[1];
		y[1] *= x[0];	z[1] *= x[0];

	
		Y = (z[0]-z[1]) / (y[0]-y[1]);

		y[0] /= x[1];
		z[0] /= x[1];
		z[0] -= y[0] * Y;

		X = z[0]/x[0];

		cout << X << " "<< Y << endl;

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