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 <iomanip>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <climits>
#include <cfloat>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <algorithm>
#include <functional>
#include <utility>
#include <numeric>

using namespace std;

typedef unsigned int UI;
typedef long long LL;
typedef unsigned long long ULL;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int,int> PII;
typedef istringstream ISS;
typedef ostringstream OSS;

#define REP( i, m, n ) for ( int i = (int)( m ); i < (int)( n ); ++i )
#define EACH( v, c ) for ( auto &v : c )

#define ITER( c ) __typeof( (c).begin() )
#define IREP( c, it ) for ( ITER(c) it = c.begin(); it != c.end(); ++it )
#define ALL( c ) (c).begin(), (c).end()

#define PB( n ) push_back( n )
#define MP( a, b ) make_pair( ( a ), ( b ) )
#define EXIST( c, e ) ( (c).find( e ) != (c).end() )

#define fst first
#define snd second

#define DUMP( x ) cerr << #x << " = " << ( x ) << endl
#define DEBUG( x ) cerr << __FILE__ << ":" << __LINE__ << ": " << #x << " = " << ( x ) << endl

typedef vector<double> VD;
typedef vector< VD > VVD;

VD solve( VVD matrix )
{
	REP( i, 0, matrix.size() )
	{
		double a = matrix[i][i];

		REP( j, 0, matrix[i].size() )
		{
			matrix[i][j] /= a;
		}

		REP( j, 0, matrix.size() )
		{
			if ( i == j )
			{
				continue;
			}

			double b = matrix[j][i];

			REP( k, 0, matrix[j].size() )
			{
				matrix[j][k] -= b * matrix[i][k];
			}
		}
	}

	VD res;

	transform( ALL( matrix ), back_inserter( res ), []( VD m ){ return m.back(); } );

	return res;
}

int main()
{
	cin.tie( 0 );
	ios::sync_with_stdio( false );

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

	cout.precision( 3 );
	cout << fixed;

	while ( cin >> a >> b >> c >> d >> e >> f )
	{
		VVD matrix { { a, b, c }, { d, e, f } };

		auto res = solve( matrix );

		cout << res[0] << ' ' << res[1] << endl;
	}

	return 0;
}

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

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

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

int main()
{
	double a,b,c,d,e,f;
	while(true){
		cin >> a;
		if(cin.eof())
			break;
		cin >> b >> c >> d >> e >> f;
		int sum = a;
		a = a*d;
		b = b*d;
		c = c*d;
		d = d*sum;
		e = e*sum;
		f = f*sum;
		double x=0.0,y=0.0;
		y = (c-f)/(b-e);
		if(y==-0.0)
			y=0;
		x = (c-b*y)/a;
		if(x==-0.0)
			x=0;
		cout.precision(3);
		cout << fixed <<x << ' ' ;
		cout.precision(3);
		cout << fixed << y << endl;

	}
	return 0;
}

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

C++: #include <iostream>
#include <iomanip>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <functional>

using namespace std;

typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int,int> PII;
typedef long long ll;
typedef unsigned long long ull;

#define REP( i, m, n ) for ( int i = (int)( m ); i < (int)( n ); i++ )
#define UREP( i, m, n ) for ( unsigned int i = (unsigned int)( m ); i < (unsigned int)( n ); i++ )

#define ITER( c ) __typeof( (c).begin() )
#define IREP( c, it ) for ( ITER(c) it = c.begin(); it != c.end(); ++it )
#define ALL( c ) (c).begin(), (c).end()
#define RALL( c ) (c).rbegin(), (c).rend()

#define PB( n ) push_back( n )
#define MP( a, b ) make_pair( ( a ), ( b ) )
#define EXIST( c, e ) ( (c).find( e ) != (c).end() )

#define fst first
#define snd second

#define DUMP( x ) cerr << #x << " = " << ( x ) << endl
#define DEBUG( x ) cerr << __FILE__ << ":" << __LINE__ << ": " << #x << " = " << ( x ) << endl

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

	while ( cin >> a >> b >> c >> d >> e >> f )
	{
		if ( a != 1 )
		{
			b /= a;
			c /= a;
			a = 1;
		}

		if ( d != 0 )
		{
			e -= d * b;
			f -= d * c;
			d = 0;
		}

		if ( e != 1 )
		{
			f /= e;
			e = 1;
		}

		if ( b != 0 )
		{
			c -= b * f;
			b = 0;
		}

		cout.precision( 4 );
		cout << setiosflags	( ios::showpoint ) << c << ' ' << f << endl;
	}

	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <cstdio>
#include <cmath>
using namespace std;
const double eps = 1e-8;

bool equals(double a, double b) {
  return abs(a-b) < eps;
}

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;
    if(equals(x,0.0)) x = 0;
    if(equals(y,0.0)) y = 0;
    printf("%.3f %.3f\n", x, y);
  }
  return 0;
}

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 )
		cout << fixed << std::setprecision(3) << (c*e - b*f)/(a*e - b*d) << " " << (c*d - a*f)/(b*d-a*e) << "\n";

	return 0;
}