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 <stdio.h>

//#define DEBUGNOW

#ifdef DEBUGNOW
#define debug
#else
#define debug 1 ? (void)0 :
#endif

double sishagonyu(double num)	{
	
	//int num2;
	
	if (num == 0) return num;
	
	if (num > 0) { num += 0.0005; }
	else { num -= 0.0005; }
	
	num = (double)(int)(num * 1000) / 1000;
	
	//	num *= 1000;
	//	num2 = (int)num;
	//	num = num2;
	//	num /= 1000;
	
	return num;
}

int main() {
	
	//printf("%.3lf", sishagonyu((double)-0.0015));
	
	
	double a, b, c, d, e, f;
	double x, y;
	
	double n, m, h, i;
	
	while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF){
		
		//if (scanf("%lf %lf %lf %lf %lf %f", &a, &b, &c, &d, &e, &f) == EOF) break;
		
		debug printf("input:\n%f %f %f\n%f %f %f\n", a, b, c, d, e, f);	//input
		
		if (a == 0) { y = c / b; }
		if (b == 0) { x = c / a; }
		if (d == 0) { y = f / e; }
		if (e == 0) { x = f / d; }
		
		n = a / d;
		
		//j = d * n;
		h = e * n;
		i = f * n;
		
		debug printf("%f %f %f\t%f %f\t%f\n", a, b, c, h, i, n);
		
		m = b - h;
		y = c - i;
		debug printf("%f %f\n", m, y);
		
		if(y <= 0.0004 && y >= -0.0005) { 
			
			debug printf("y = 0\n");
			y = 0; 
			
		} else {
			
			y /= m;
			debug printf("%f\n", y);
			
			i = c - (b * y);
			x = i / a;
			
			debug printf("x = %f, y = %f\n", x, y);
			
			x = sishagonyu(x);
			y = sishagonyu(y);
			
		}
		//printf("%f %f\n", x, y);
		printf("%.3f %.3f\n", x, y);
	}
	return 0;
}
//2.2 3.3 22.24706 3.2 8.7 50.12932
//3.2777 4.5564

//1 2 3 4 5 6
//-1.000 2.000

//2 -1 -2 -1 -1 -5
//1.000 4.000

//2 -1 -3 1 -1 -3
//0.000 3.000

// 2 -1 -3 -9 9 27
// 0.000 3.000

C++: #include <cstdio>
#include <iostream>
double sol[10000][2];
int main()
{
    double a, b, e, c, d, f;
    int i = 0;
    while (std::cin >> a >> b >> e >> c >> d >> f)
    {
        double det = a * d - b * c;

        double aa = d / det, bb = -b / det, cc = -c / det, dd = a / det;
        sol[i][0] = aa * e + bb * f;
        sol[i][1] = cc * e + dd * f;

        i++;
    }
    for (int j = 0; j < i; j++)
        printf("%.3f %.3f\n", sol[j][0], sol[j][1]);
    return 0;
}

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

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

using db = double;

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);
		cout << x << ' ' << y << '\n';
	}
	return 0;
}

C++: #include <iostream>
#include <stdio.h>
using namespace std;
int main()
{
	float 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);
		printf("%.3lf %.3lf\n",x,y);
	}
	return 0;
}

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

float gcd(float &m, float &n) {
	int a, b, t;
	a = (int)m;
	b = (int)n;
	while (1) {
		if (b==0) return (float)a;
		t = b;
		b = a % b;
		a = t;
	}
}

int main() {
	float a, b, c, d, e, f;
	float t, u, v;
	float x, y;
	
	while (1) {
		cin>>a>>b>>c>>d>>e>>f;
		if (cin.eof()) break;

		if ((a<0.0 && d<0.0) || (a>=0.0 && d>=0.0)) {
			t = a * d / gcd(a, d);
			u = t / a;
			b *= u;
			c *= u;
			u = t / d;
			e *= u;
			f *= u;
			y = (c - f)/(b - e);
			x = c - b * y;
		} else if (a<0.0 && d>=0.0) {
			a *= -1;
			b *= -1;
			c *= -1;
			t = a * d / gcd(a, d);
			u = t / a;
			b *= u;
			c *= u;
			u = t / d;
			e *= u;
			f *= u;
			y = (c - f)/(b - e);
			x = c - b * y;
		} else {
			d *= -1;
			e *= -1;
			f *= -1;
			t = a * d / gcd(a, d);
			u = t / a;
			b *= u;
			c *= u;
			u = t / d;
			e *= u;
			f *= u;
			y = (c - f)/(b - e);
			x = c - b * y;
		}

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

C++: #include<stdio.h>

void printFunc(int a,int b,int c,int d,int e,int f);

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

  while(fscanf(stdin,"%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f) != EOF){
    printFunc(a,b,c,d,e,f);
  }
  
  return 0;
}

void printFunc(int a,int b,int c,int d,int e,int f){
  float ansX,ansY;
  if(b == 0 || e == 0){
    ansY = 0;
  }
  else{
    ansY = (float)(c*d - f*a)/(float)(b*d - e*a);
  }

  if(a == 0 || d == 0){
    ansX = 0;
  }
  else{
    ansX = (float)(c*e - f*b)/(float)(a*e - d*b);
  }

  if(ansX < 0.0005f && ansX > -0.0004f){
    ansX = 0.0f;
  }
  if(ansY < 0.0005f && ansY > -0.0004f){
    ansY = 0.0f;
  }

  printf("%.3f %.3f\n",ansX,ansY);
}

C++: //
//  main.cpp
//  0004
//
//  Created by 竹内 文登 on 13/07/14.
//  Copyright (c) 2013年 竹内 文登. All rights reserved.
//

#include <iostream>
#include <cstdio>
using namespace std;

int main()
{
    double a,b,c,d,e,f;
    double x,y;
    
    while(cin >> a >> b >> c >> d >> e >> f){
        if(b*d - a*e != 0){
         
         double tmp1 = (c*e - b*f),tmp2 = (a*e - b*d),tmp3 = (c*d - a*f),tmp4=(b*d - a*e);
        tmp1 = tmp1/tmp2;
        tmp2 = tmp3/tmp4;
        x = tmp1;
        y = tmp2;
         printf("%.3f %.3f",x,y);
        }
    }
    return 0;
}

C++: #include<iostream>
int GCM(int a,int b){
	if(b==0)return a;
	return GCM(b,a%b);
}

int main(){
	int a,b,c,d,e,f;
	while(std::cin>>a>>b>>c>>d>>e>>f){
		float x=0.000f,y=0.000f;
		int a_=a,b_=b,c_=c,d_=d,e_=e,f_=f;
		b_*=GCM(a,d)/a,c_*=GCM(a,d)/a;
		e_*=GCM(a,d)/d,f_*=GCM(a,d)/d;
		y=(c_-f_)/(b_-e_);
		x=(c-y*b)/a;
		std::cout<<x<<" "<<y<<std::endl;
	}
	return 0;
}

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

int main(void){
	double x1[1000],y1[1000];
	int a=0,b=0,c=0,d=0,e=0,f=0,x2,y2,i=0,j;
    
    while(scanf("%d %d %d %d %d %d\n",&a,&b,&c,&d,&e,&f) != EOF)
	{
		x2 = ((c * e -b * f) / (a * e - b * d))*1000+0.5;
	    y2 = ((c - a * x2) / b)*1000+0.5;

		x1[i] = x2/1000;
		y1[i] = y2/1000;

		i+=1;
	}
	for(j=0;j<i;j++)
	{
		printf("%.3lf %.3lf\n",x1[i],y1[i]);
	}
  return 0;
}

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

int main(){
    float a,b,c,d,e,f;
    while(-1!=scanf("%f%f%f%f%f%f",&a,&b,&c,&d,&e,&f)){
        b/=a;
        c/=a;
        e-=d*b;
        f-=d*c;
        f/=e;
        c-=b*f;

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

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