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<stdio.h>
using namespace std;

int main() {
	double a, b, c, d, e, f;
	while (cin >> a >> b >> c >> d >> e >> f) {
		printf("%.3f", (c*e - b*f) / (a*e - d*b));
		cout << ' ' ;
		printf("%.3f", (c*d - a*f) / (b*d - a*e));
		cout << endl;
	}
}

C++: #include <iostream>
using namespace std;
int main() {
  int a, b, c, d, e, f;
  while (cin >> a >> b >> c >> d >> e >> f) {
    printf("%.3f %.3f\n", (1.0 * b * f - c * e) / (b * d - a * e), (1.0 * a * f - c * d) / (a * e - b * d));
  }
  return 0;
}

C++: #include <iostream>
#include <algorithm>
#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=(a*f-c*d)/(a*e-b*d);
    x=(c-b*y)/a;
    cout<<fixed<<setprecision(3)<<x<<" "<<y<<endl;
  }

  return 0;
}

C++: #include <iostream>
#include <vector>
#include <map>

using namespace std;

int main()
{
int a,b,c,d,e,f;
double A[2][2];
double B[2];
double inv_A[2][2];
scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f);
int det = a*e-b*d;
A[0][0]=a; A[0][1] = b;
A[1][0]=d; A[1][1] = e;
B[0] = c;
B[1] = f; 

inv_A[0][0]=1.0/(double)det *A[1][1]; inv_A[0][1]=1.0/(double)det *-A[1][1];
inv_A[1][0]=1.0/(double)det *-A[1][0]; inv_A[1][1]=1.0/(double)det *A[0][0];

double res[2];
res[0]=0;
res[1]=0;

for(int i=0;i<2;i++){
for(int j=0;j<2;j++){
for(int k=0;k<2;k++){
res[i]+=inv_A[j][k]*B[k];
}
}
}

printf("%.3f %.3f\n",res[0],res[1]);
}

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

int main(int argc, char **argv){
	double a = 0;
	double b = 0;
	double c = 0;
	double d = 0;
	double e = 0;
	double f = 0;

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

		std::cout << std::fixed << std::setprecision(3) << x << " " << y << std::endl;
	}
	return 0;
}

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

double Cut(double figure,int keta)
{
	for(int i=0; i<keta+1; ++i)
	{
		figure *= 10.0;
	}

	int figureI = figure;

	figureI = figureI-figureI%10+(figureI%10>=5 ? 10 : 0);//四捨五入　一回1の桁を0として、1の位が5以上なら〜と場合分け

	figure = figureI;

	for(int i=0; i<keta+1; ++i)
	{
		figure /= 10.0;
	}

	return figure;
}

int main()
{
	std::cout << std::setprecision(3);//小数点以下の”表示”桁数
	
	std::cout << std::setiosflags(std::ios::fixed);
	
	double a,b,c,d,e,f;

	while(std::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);

		std::cout << Cut(x,3) << ' ' << Cut(y,3) << '\n';
	}
	
}

C++: #include <stdio.h>

int main(void)
{
	int ren[3];
	int ren2[3];
	float x;
	float y;
	float z;
	
	while (scanf("%d %d %d %d %d %d",&ren[0],&ren[1],&ren[2],&ren2[0],&ren2[1],&ren2[2]) != EOF){
		x = (double)(ren[2]*ren2[1] - ren2[2]*ren[1]) / (ren[0]*ren2[1] - ren2[0]*ren[1]);
		y = (double)(ren[2]*ren2[0] - ren2[2]*ren[0]) / (ren[1]*ren2[0] - ren2[1]*ren[0]);
		
		printf("%.3f %.3f\n",x,y);
	}
	return(0);
}

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){
    A=a;
    a=a*d,b=b*d,c=c*d;
    d=d*A,e=e*A,f=f*A;

    Y=b-e,Z=c-f;
    y=Z/Y;
    x=(c-y*b)/a;
    /*x=x+0.0005,y=y+0.0005;
    x=x*1000,y=y*1000;
    x=floor(x);
    y=floor(y);
    x=x/1000,y=y/1000;
    if(x==-0)x=0;
    if(y==-0)y=0;*/
   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);


    }

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

using namespace std;

int main(){
  int 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 = (a*f - c*d)/(a*e - b*d);
    cout <<x<<" "<<y<<endl;
  }
  return 0;
}

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

C++: #include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int a, b, c, d, e, f;
    while (cin >> a >> b >> c >> d >> e >> f) {
        double x = round((e * c - b * f) / (e * a - b * d) * 1000) / 1000;
        double y = round((c - a * x) / b * 1000) / 1000;
        cout << fixed << setprecision(3) << x << " " << y << "\n";
    }
}

C++: #include <cstdio>

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

	while (scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF){
		double y = (d * c - a * f) / (d * b - a * e);
		double x = (f - e * y) / d;
		printf("%.3f %.3f\n", x, y);
	}

	return 0;
}

C++: #include <cstdio>
#include <queue>
#include <vector>

using namespace std;


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

C++: #include <stdio.h>

int main(void)
{
	double a, b, c, d, e, f;
	double x, y;
	
	while (scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF){
		
		x = (e * c + (-b) * f) / (a * e - d * b);
		y = ((-d) * c + a * f) / (a * e - d * b);
		if (x == 0) x = 0.000;
		else if (y == 0) y = 0.000;
		
		printf("%.3f %.3f\n", x , y);
	}
	
	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);
  if(y == 0)y = 0;
  if(x == 0)x = 0;
  cout << fixed << setprecision(3) << x << " " << y << endl;
  }
  return 0;
}

C++: #include<stdio.h>
int main(){
	double a,b,c,d,e,f;
	double A,B,C,D,E,F;
	double x,y;
	
	while(scanf("%lf%lf%lf%lf%lf%lf",&a ,&b ,&c ,&d ,&e ,&f )!=EOF){
		A=a*d;
		B=b*d;
		C=c*d;
		D=a*d;
		E=a*e;
		F=a*f;
//		printf(" %lfx + %lfy = %lf\n",A,B,C);
//		printf(" %lfx + %lfy = %lf\n",D,E,F);
		if(B==E){y=0;}
		else{y=(C-F)/(B-E);}
		x=(c-b*y)/a;
		printf("%1.3lf %1.3lf",x,y);
	}
	return 0;
}

C++: #include<cstdio>

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

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

int main() {
	std::cout << std::setprecision(3);
	std::cout.setf(std::ios::fixed, std::ios::floatfield);
	double a, b, c, d, e, f;
	while( std::cin >> a >> b >> c >> d >> e >> f ) {
		const double x = (b*f-c*e) / (b*d-a*e);
		const double y = (c-a*x) / b;
		std::cout << ((-0.0005<=x && x<0.0005)?0.0:x) << " " << ((-0.0005<=y && y<0.0005)?0.0:y) << std::endl; 
	}
}