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>
 
using namespace std;
 
#define EPS 1e-9
 
int main()
{
    int a,b,c,d,e,f;
    float x,y,dx,dy;
    while( cin >> a >> b >>c >>d >> e >> f ) {
        x = (c*e-b*f)/(float)(a*e-b*d);
        y = (c - a*x)/(float)b;
         
 
        printf("%.3f %.3f\n",x+EPS,y+EPS);
    }
 
 
 
    return 0;
}

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

int main()
{
	double a,b,c,d,e,f;
	while(cin>>a>>b>>c>>d>>e>>f){
		cout<<(c-b*(f-d*c/a)/(e-d*b/a))/a<<" ";
		cout<<(f-d*c/a)/(e-d*b/a)<<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", a, b);
	} 

	return 0;
}

C++: while(True):
	try:
		a,b,c,d,e,f = map(float,input().split(" "))
		z = a*e - b*d
		if(z!=0):
			x = (c*e-b*f)/z
			y = (a*f-c*d)/z
		print("{:.3f} {:.3f}".format(x+0,y+0))
	except:
		break

C++: // http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0004
#include <bits/stdc++.h>
using namespace std;

int main(){
  for(double a,b,c,d,e,f,x,y; cin>>a>>b>>c>>d>>e>>f;){
    x = (e*c-b*f)/(a*e-b*d);
    y = ((-d)*c+a*f)/(a*e-b*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;
    cout<<fixed; // ?°???°?????\??????????????????????????????????????????????????°???????????°??????????????????
    cout<<setprecision(3)<<x<<" "<<y<<endl;
  }
  return EXIT_SUCCESS;
}

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

#define REP(i, a) for(int i=0;i<(int)a;++i)
using namespace std;

void solver() {
    double a, b, c, d, e, f;
    while (cin >> a >> b >> c >> d >> e >> f) {
        auto x = (c * e - f * b) / (a * e - b * d);
        auto y = (c - a * x) / b;
        if(x<0.0005) x=0;
        if(y<0.0005) y=0;
        printf("%.3f %.3f\n",x,y);
    }
}

int main() {
    solver();
    return 0;
}

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

using namespace std;

int main(){

  int i=0;
  float a, b, c, d, e, f;
  float temp;
  float x, y;

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

    temp = a/d;
    d = d*temp;
    e = e*temp;
    f = f*temp;
    b = b-e;
    c = c-f;
    y = c/b;
    x = (f-e*y)/d;

    cout << fixed << setprecision(3) << x << " " << y << "\n";
  }

  return 0;
}

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

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

	cin >> a >> b >> c >> d >> e >> f;

	y = ( c * d  - a * f ) / ( b * d - a * e );
	x = ( c - b * y ) / a;

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

C++: #include <iostream>
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 ,y);
    }
    return 0;
}

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

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

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

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

C++: #include<cstdio>
int main(){
    float a,b,c,d,e,f,x,y;
    while(scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f)!=EOF){
        x=(c*e-f*b)/(a*e-d*b);
        y=(c*d-a*f)/(b*d-e*a);
        if(x==0)    x=0;
        if(y==0)    y=0;
        printf("%.3f %.3f\n",x, y);
    }
    return 0;
}
/*int main(){
	float a,b,c,d,e,f,x,y,i,n;
	//while(cin >> a >> b >> c >> d >> e >> f){
	while(scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f)!=EOF){
		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 <iostream>
#include <iomanip>
using namespace std;
int main(void){
    // Here your code !
    double a, b, c, d, e, f;
    while (cin >> a >> b >> c >> d >> e >> f) {
        double x = (c * e - b * f) / (a * e - b * d);
        double y = (a * f - c * d) / (a * e - b * d);
        x *= 1000; x = x + (x > 0 ? 0.5 : -0.5); x = (int)x;
        y *= 1000; y = y + (y > 0 ? 0.5 : -0.5); y = (int)y;
        //cout << %.3f %.3f\n << x / 1000 << y / 1000 << endl;
        cout << fixed << setprecision(4) << x /1000 << " " << y / 1000 <<endl;
    }
    return 0;
}

C++: #define _USE_MATH_DEFINES

#include <iostream>
#include <string>
#include <iomanip>
#include <cmath>
#include <algorithm>
#include <utility>
#include <vector>
#include <numeric>

using namespace std;

int main()
{
	double a, b, c, d, e, f;
	for (; cin >> a >> b >> c >> d >> e >> f;)
	{
		double x, y;
		if (a == 0 || b == 0 || d == 0 || e == 0)
		{
			if (a == 0)
			{
				y = c / b;
				x = (f - e * y) / d;
			}
			else if (b == 0)
			{
				x = c / a;
				y = (f - d * x) / e;
			}

			if (d == 0)
			{
				y = f / e;
				x = (c - b * y) / a;
			}
			else if (e == 0)
			{
				x = f / d;
				y = (c - a * x) / b;
			}
		}
		else
		{
			double a0 = a * e;
			double c0 = c * e;

			double d0 = d * b;
			double f0 = f * b;

			x = (f0 - c0) / (d0 - a0);

			y = (c - a * x) / b;
		}

		cout << fixed << setprecision(3) << x << " " << y << endl;

	}
}

C++: #include <stdio.h>

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

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

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

using namespace std;

double solutionY();
double solutionX(double);
double a1,b1,c1,d1,e1,f1;

int main(){
  while(cin >> a1 >> b1 >> c1 >> d1 >> e1 >> f1){
    double x,y;
    
    y = solutionY();
    x = solutionX(y);
    
    cout << fixed << setprecision(3) << x << " " << y << endl ;
  }
  return 0;
}

double solutionY(){
  double b,c,e,f;
  b = b1/a1;
  c = c1/a1;

  e = e1/d1;
  f = f1/d1;
  
  return (c - f)/(b - e);
}

double solutionX(double y){
  double b,c;
  b = b1/a1;
  c = c1/a1;
  
  return (c - b*y);
}