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>
#include<cmath>

using namespace std;

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

C++: #include <cstdio>
#define LOOP(index,times) for(int index=0;index<times;index++)
using namespace std;

int main(){

float l[6];

while(scanf("%f %f %f %f %f %f",&l[0],&l[1],&l[2],&l[3],&l[4],&l[5]) != EOF){

	printf("%.3lf %.3lf\n",(l[2]*l[4]-l[1]*l[5])/(l[0]*l[4]-l[1]*l[3]),(l[2]*l[3]-l[0]*l[5])/(l[1]*l[3]-l[0]*l[4]));		

}
return 0;		
}

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

int main() {
  int a, b, c, d, e, f;
  while(cin >> a >> b >> c >> d >> e >> f) {
    double y = (d*c-a*f)/(double)(d*b-a*e);
    double x = (f-e*y)/(double)d;
    char buff[100];
    sprintf(buff, "%.3f", x);
    if(!strcmp(buff, "-0.000")) x = 0;
    sprintf(buff, "%.3f", y);
    if(!strcmp(buff, "-0.000")) y = 0;
    printf("%.3f %.3f\n", x, y);
  }
  return 0;
}

C++: //
//  main.cpp
//  Sample
//
//  Created by h3037183 on 2017/07/31.
//  Copyright ?? 2017??´ ?°????. All rights reserved.
//

#include <iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int main(){
    double a,b,c,d,e,f,x,y;
    for(;;){
    cin>>a>>b>>c>>d>>e>>f;
    x=(c*e-b*f)/(a*e-b*d);
    y=(c*d-f*a)/(b*d-a*e);
        if(x==0)x=0;
        if(y==0)y=0;
    printf("%.3lf %.3lf",x,y);
    cout<<endl;
    }
    return 0;
}

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

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

	return 0;
}

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

using namespace std;

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

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

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

using namespace std;

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

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

    return 0;
}

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

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

}

C++: #include <stdio.h>

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 ee = e / b, dd = d / a;
    double ax = a * ee, cx = c * ee;
    printf("%f ", (cx - f) / (ax - d));
    b *= dd, c *= dd;
    printf("%f\n", (c - f) / (b - e));
  }
  return 0;
}

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

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

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

  return 0;
}

C++: #include<stdio.h>
int main(){double a,b,c,d,e,f,x,y;while(scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f)!=-1){ y=(a*f-d*c)/(a*e-b*d);x=(c-b*y)/a;printf("%.3f %.3f\n",x+0.0005,y+0.0005);}return 0;}

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

double d_round(double frac, int digit) {
	double copy = frac * pow(10, digit - 1);
	copy = copy - (int)copy;
	return frac + (int)(copy + (copy > 0.5 ? 0.5 : 0));;
}

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

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

double round(double x){
    if(x > 0) return floor(x + 0.5);
    else return -1.0 * floor(fabs(x) + 0.5);
}

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

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

using namespace std;

int main(void) {
	double x, y;
	double a, b, c, d, e, f;
	
	while(1) {
		cin >> a >> b >> c >> d >> e >> f;
		if(cin.eof()) { break; }
		
		y = (f-d*(c/a))/(-d*(b/a)+e);
		x = (c-b*y)/a;
		cout << setiosflags(ios::fixed) << setprecision(3) << x << " " << y << endl;
	}
	
	return 0;
}

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

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

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

	return 0;
}

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

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


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