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<algorithm>
#include<complex>
#include<iomanip>
using namespace std;
int main(){
	double a,b,c,d,e,f,x,y;
	int t=85000;
	for(int i=t;i;i--){
		for(int j=i;j;j--){
			if(i+j==2)a=0.0;
		}
	}
	while(cin>>a){cin>>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;
		cout<<fixed<<setprecision(3)<<x<<" ";
		cout<<fixed<<setprecision(3)<<y<<endl;
	}
	return 0;
}

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

using namespace std;

int main() {

	int i;
	double no[6] = { 0 }, a, b;

	while (cin >> no[0]) {
	
	for (i = 1; i < 6; i++) {
			cin >> no[i];
		}
		
		a = ((no[2] * no[4]) - (no[1] * no[5])) / ((no[0] * no[4]) - (no[1] * no[3]));
		b = ((no[3] * no[2]) - (no[0] * no[5])) / ((no[1] * no[3]) - (no[0] * no[4]));
		if (a == 0)
			a = 0;
		if (b == 0)
			b = 0;
		
		printf("%.3f %.3f\n", a, b);
	} 

	return 0;
}

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

using db = double;
const db eps = 1e-6;

int main() {
	cout << fixed << setprecision(3);
	ios :: sync_with_stdio(false);
	db a, b, c, d, e, f;
	while(cin >> a >> b >> c >> d >> e >> f) {
		db x = (c * e - b * f) / (a * e - b * d);
		db y = (a * f - c * d) / (a * e - b * d);
		if(x > -eps && x < eps) x = 0;
		if(y > -eps && y < eps) y = 0;
		cout << x << ' ' << y << '\n';
	}
	return 0;
}

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

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

  while(std::cin >>a>>b>>c>>d>>e>>f){

    x = (double)(c*e-b*f)/(a*e-b*d);
    y = (double)(a*f-c*d)/(a*e-b*d);
    //if(x == 0){x = 0;}
    //if(y == 0){y = 0;}
    printf("%.3f %.3f\n",x,y);

  }
}

C++: #include <iostream>
#include <iomanip>
using namespace std;
 
int main()
{
      double a,b,c,d,e,f;
 
      while(cin >> a >> b >> c >> d >> e >> f)
      {
            a = a * d / a;
            b = b * d / a;
            c = c * d / a;
 
            d = d - a;           // d = 0
            e = e - b;
            f = f - c;
 
            e = e * b / e;
            f = f * b / e;
 
            b = b - e;            // b = 0
            c = c - f;
 
            a = a / a;
            c = c / a;            // x = c
 
            e = e / e;
            f = f / e;            // y = f
 
            cout << fixed << setprecision(3) << c << " " << fixed << setprecision(3) << f << endl;
      }
 
      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;
    while(cin>>a>>b>>c>>d>>e>>f){
    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 <cstdio>

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

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

    int time = -d;
    d += a * time, e += b * time, f += c * time;

    double y = f / e;
    double x = c - b * y;

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

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


using namespace std;

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

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

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

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

    return 0;
    
    }

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

using namespace std;

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

    while (cin >> a >> b >> c >> d >> e >> f) {
        answer1 = round((e * c - b * f) / (a * e - b * d) * 1000) / 1000;
        answer2 = round((-d * c + a * f) / (a * e - b * d) * 1000) / 1000;
        if (answer1 == 0) answer1 = 0.000;
        if (answer2 == 0) answer2 = 0.000;
        cout << fixed << setprecision(3) << answer1<< " " << answer2 << endl;
    }
    
    return 0;
}

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

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

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

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


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

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

C++: #include <stdio.h>
#pragma warning(disable : 4996)
long double a, b, c, d, e, f, x, y;
int main() {
	while (~scanf("%Lf%lf%lf%lf%lf%lf", &a, &b, &c, &d, &e, &f)) {
		x = (c * e - b * f) / (a * e - b * d);
		y = (a * f - c * d) / (a * e - b * d);
		if (-0.0005 < x && x < 0.0005) x = 0.0;
		if (-0.0005 < y && y < 0.0005) y = 0.0;
		printf("%.3Lf %.3Lf\n", x, y);
	}
	return 0;
}

C++: #include <iostream>
#include<string>
#include<cmath>
#include<algorithm>
#include<cctype>
#include<queue>
#include<stack>
#include<stdio.h>
#include<vector>
#include<set>
#include<map>
#include<iomanip>
#define rep(i,n) for(int i=0;i<n;i++)
typedef int long long ll;

using namespace std;
int main(){

    double a,b,c,d,e,f;
    
    while(cin>>a){
        cin>>b>>c>>d>>e>>f;
        double h=a*e-b*d;
        double xx=(c*e-f*b);
        double yy=(a*f-c*d);
        
        //double ue=a*c+b*f;
        //double st=d*c+e*f;
        
        double x=xx/h;
        double y=yy/h;
        printf("%.3f %.3f \n",x,y);
       
    }
return 0;
}

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