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<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 + 0.0000001, y + 0.0000001);
	}
}

C++: #include<stdio.h>
#include<stdlib.h>
int main()
{
    int a,b,c,d,e,f;
    double l,k;
    while (scanf ("%d %d %d %d %d %d", &a,&b,&c,&d,&e,&f) != EOF){
        l= a*e-d*b;
        k = b*d - a*e;
        double x = (c*e-b*f)/l;
        double y =(c*d - a*f)/k;

        if(x ==0)
            x = abs(x);
        if(y == 0)
            y = abs(y);

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

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

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

C++: #include <cstdio>

//input
int a, b, c, d, e, f;

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

int main(int argc, char const *argv[]) {
	//  freopen("in.txt", "r", stdin);

	while (scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f) != EOF) {
		solve();
	}

	return 0;
}

C++: #include<iostream>
#include<string>
#include<cmath>
#include<queue>
#include<vector>
#include<functional>
#include<algorithm>
#include<cstdio>
using namespace std;
int main() {
	long double a, b, c, d, e, f;
	while (cin >> a >> b >> c >> d >> e >> f) {
		c *= (d / a);
		b *= (d / a);
		a *= (d / a);
		long double ansx=0, ansy=0;
		if (f - c != 0) {
			ansy = (f - c) / (e - b);
		}
		if (a != 0) {
			ansx = (c - ansy*b) / a;
		}
		ansx *= 1000;
		ansx = round(ansx);
		ansx /= 1000;
		ansy *= 1000;
		ansy = round(ansy);
		ansy /= 1000;
		printf("%.3LF %.3LF\n", ansx, ansy);
	}
}

C++: #include<bits/stdc++.h>

using namespace std;

int main(){

  double x,y,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);

    x += 0;
    y += 0;
    
    printf("%0.3lf",x);
    cout << " ";
    printf("%0.3lf",y);
    cout << endl;
    
  }

}

C++: #include <stdio.h>
#include <vector>
#include <utility>
#include <algorithm>
#include <iostream>
#include <limits>
#include <iomanip>
using namespace std;
#define rep(i,n) for(int i=0;i<n;++i)
#define ld long double
ld a, b, c, d, e, f, x, y;
ld shish(ld a)
{
	if (a == 0) { return a; }
	
	a *= 1000;
	if (a > 0) {
		a += 0.51;
	}
	else {
		a -= 0.51;
	}
	a = (ld)((int)a);
	a /= 1000;
	return a;
}
int main() {
	while (cin >> a >> b >> c >> d >> e >> f) {
		y = (a*f - c*d) / (ld)(a*e - b*d);
		x = (c*e - f*b) / (ld)(a*e - b*d);

		x = shish(x);
		y = shish(y);
		if (x == 0) { cout << "0.000"; }
		else {
			cout << fixed << setprecision(3) << x;
		}
		cout << " ";
		if (y == 0) { cout << "0.000" << endl; }
		else{
			cout << fixed << setprecision(3) << y << endl;
		}
	}
	return 0;
}

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

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

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

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

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

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

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

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

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

double mround(double a){
	if(a<0)return a-0.0005;
	return a+0.0005;
}
int main(){
	double a[6];
	double x,y;
	while(cin>>a[0]>>a[1]>>a[2]>>a[3]>>a[4]>>a[5]){
		double b=a[1]/a[4];
		for(int i=0;i<3;i++)a[3+i]*=b;
		x=(a[2]-a[5])/(a[0]-a[3]);
		y=(a[2]-x*a[0])/a[1];

		mround(x);
		mround(y);
		printf("%.3f %.3f",x,y);
	}
	


	return 0;
}

C++: #include<iostream>

using namespace std;

int main(){
	//Cramer's Rule
	double a, b, c, d, e, f;

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

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

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

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(){
  double m[2][2],x[2],y[2],det,i[2][2];
  while(cin >>m[0][0]>>m[0][1]>>y[0]>>m[1][0]>>m[1][1]>>y[1]){
    det = m[0][0]*m[1][1]-m[1][0]*m[0][1];
    i[0][0] = m[1][1]/det;
    i[0][1] = -m[0][1]/det;
    i[1][0] = -m[1][0]/det;
    i[1][1] = m[0][0]/det;
    x[0] = i[0][0]*y[0]+i[0][1]*y[1];
    x[1] = i[1][0]*y[0]+i[1][1]*y[1];
    printf("%.3lf %.3lf\n",x[0],x[1]);
  }
  return 0;
}

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


/*
//my header
#include "define.h"
#include "geometry.h"*/

#define MyAbs(a) ((a)>0?(a):-(a))
#define MyEqualDoule(a,b) (MyAbs(a-b)<1e-6)

void init()
{
#ifdef _WIN32
	freopen("1.txt", "r", stdin);
#endif
}

void func();

int main()
{
	init();
	func();

	return 0;
}


void func()
{
	float a,b,c,d,e,f, x, y;
	while(~scanf("%f%f%f%f%f%f", &a, &b, &c, &d, &e, &f))
	{
		if(MyEqualDoule(a*e-b*d,0))
			x = 0;
		else
			x = (c*e-f*b)/(a*e - b*d);

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