Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

var sc = bufio.NewScanner(os.Stdin)

func read() string {
	sc.Scan()
	return sc.Text()
}

func main() {
	sc.Split(bufio.ScanLines)
	for sc.Scan() {
		s := strings.Split(sc.Text(), " ")
		a, _ := strconv.ParseFloat(s[0], 64)
		b, _ := strconv.ParseFloat(s[1], 64)
		c, _ := strconv.ParseFloat(s[2], 64)
		d, _ := strconv.ParseFloat(s[3], 64)
		e, _ := strconv.ParseFloat(s[4], 64)
		f, _ := strconv.ParseFloat(s[5], 64)
		x := ((b * f) - (c * e)) / ((b * d) - (a * e))
		y := ((a * f) - (c * d)) / ((a * e) - (b * d))
		if x == 0 {
			fmt.Printf("0.000 %.3f\n", y)
		} else if y == 0 {
			fmt.Printf("%.3f 0.000\n", x)
		} else {
			fmt.Printf("%.3f %.3f\n", x, y)
		}
	}
}

C++: #include <stdio.h>
float round3(float a){
	a=a*10000;
	if(int(a)%10>5)a=a+10;
	a=float (int (a/10));
	a=a/10000;
	return a;

}
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){
		if(a!=0.0){
		  y=(f-c*d/a)/(e-b*d/a);
		  x=(c-b*y)/a;
		}
		else if(d!=0.0 && b!=0.0){
		  y=c/b;
		  x=(f-e*y)/d;
		}
		else if(d==0.0){
		  x=0.0;
		  if(b!=0.0) y=c/b;
		  else if(e!=0.0) y=f/e;
		}

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

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

/*
ax + by = c
dx + ey = f

x = (c-by)/a
d(c-by)/a + ey = f
dc/a - dby/a + ey = f
ey - dby/a = f - dc/a
y(e-db/a) = f - dc/a
y = (f-dc/a)/(e-db/a)

aex + bey = ce
bdx + bey = bf
aex - bdx = ce - bf
x(ae - bd) = ce - bf
x = (ce - bf)/(ae - bd)
by = c - ax
y = (c - ax)/b
*/
int main()
{
    while(true){
        double a, b, c, d, e, f;
        std::cin >> a >> b >> c >> d >> e >> f;
        if(std::cin.eof()) break;
        double x, y;
        if(b == 0) return 0;
        // if(b){
            x = (c*e - b*f) / (a*e - b*d);
            y = (c - a*x) / b;
        // }else{
        //     y = (f-d*c/a)/(e-d*b/a);
        //     x = (c-b*y)/a;
        // }
        if(x == -0) x = 0;
        if(y == -0) y = 0;
        std::cout << std::fixed << std::setprecision(3);
        std::cout << x << " " << y << std::endl;
    }
    return 0;
}

C++: //http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0004
#include <iostream>
using namespace std;
int main() {
	cin.tie(0); ios::sync_with_stdio(false);
	double a, b, c, d, e, f;
	while (cin >> a >> b >> c >> d >> e >> f) {
		a *= e / b; c *= e / b;
		double x = (c - f) / (a - d);
		cout << x << " ";
		double y = (f - d*x) / e;
		cout << y << endl;
	}

}

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

int main()
{
	double a, b, c, d, e, f;
	while (std::cin >> a >> b >> c >> d >> e >> f) {
		double const denominator = a * e - b * d;
		int const x1000 = ((c * e - b * f) / denominator + 0.0005) * 1000;
		int const y1000 = ((a * f - c * d) / denominator + 0.0005) * 1000;
		std::cout.setf(std::ios::fixed);
		std::cout.precision(3);
		std::cout << std::showpoint
				  << x1000 / 1000.0 << ' ' << y1000 / 1000.0 << std::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 det,x,y;
    det = a*e-b*d;
    x = (e*c-b*f)/det;
    y = (-c*d+a*f)/det;
    printf("%.3f\t%.3f\n",x,y);}
}

C++: #include <iostream>
#include <iomanip>
using namespace std;
int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    double a, b, c, d, e, f;
    while (cin >> a >> b >> c >> d >> e >> f) {
        double x = (e * c - b * f) / (e * a - b * d);
        double y = (c - a * x) / b;
        if (x == 0) x = 0;
        if (y == 0) y = 0;
        cout << fixed << setprecision(3) << x << " " << y << "\n";
    }
}

C++: #include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string>
using namespace std;
int main(){
	double a,b,c,d,e,f;
	double x,y;
	while(cin >> a >> b >> c >> d >> e >> f){
	//	ax+by=c > y=(c-ax)/b
	// 	dx+ey=f > y=(f-dx)/e
	//	> (c-ax)/b=(f-dx)/e
	//	c/b-(a/b)x=f/e-(d/e)
	// 	(d/e)x-(a/b)x=f/e-c/b
		double tmp=(d/e)-(a/b);
		x=((f/e)-(c/b))/tmp;
		y=(c-(a*x))/b;
		x=x*1000;y=y*1000;
		if(x<0)		x-=0.5;
		else 		x+=0.5;
		if(y<0)		y-=0.5;
		else		y+=0.5;
		x=int(x);y=int(y);
//		cout << x << " "<< y << endl;
		x/=1000;
		y/=1000;
		printf("%.3lf %.3lf\n", x , y );
	}
}

C++: //
//  main.cpp
//  CppTest
//
//  Created by Ryu on 2017/02/08.
//  Copyright ?? 2017??´ Ryu. All rights reserved.
//

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

int main(int argc, const char * argv[]) {
    // insert code here...
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    float e[10000][6];
    int n = 0;
    float x[10000], y[10000];
    while (cin >> e[n][0] >> e[n][1] >> e[n][2] >> e[n][3] >> e[n][4] >> e[n][5]) {
        float d = e[n][0] * e[n][4] - e[n][1] * e[n][3];
        x[n] = (e[n][4] * e[n][2] - e[n][1] * e[n][5]) / d;
        y[n] = (0 - e[n][3] * e[n][2] + e[n][0] * e[n][5]) / d;
        //printf("d: %f, x: %.4f, y: %.4f\n", d, x[n], y[n]);
        n++;
    }
    
    
    for(int i = 0; i < n; i++){
        if(x[i] == -0){
            x[i] = 0;
        }
        if(y[i] == -0){
            y[i] = 0;
        }
        printf("%.4f %.4f\n", x[i], y[i]);
    }
    
    
    return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<stdio.h>
using namespace std;
int main(){
	long a,b,c,d,e,f;
	long o,p,q,r,s,t;
	double x,y;
	while(scanf("%ld%ld%ld%ld%ld%ld",&a,&b,&c,&d,&e,&f)!=EOF){
		o=a;p=b;q=c;r=d;s=e;t=f;
		o*=d;p*=d;q*=d;
		r*=a;s*=a;t*=a;
		//printf("%d %d %d %d %d %d \n",o,p,q,r,s,t);
		p-=s;
		q-=t;
		if(q==0){
			y=0.0;
		}
		else{
		y=(float)(q/p);
		}
		int g=(int)(e*y);
		g*=-1;
		if(f+g==0){
			x=0.0;
		}
		else{
			x=(float)((f+g)/d);
		}
		printf("%.3lf %.3lf\n",x,y);
	}
	return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#include<cstdio>

int main(){
	double a, b, c, d, e, f;
	scanf("%lf%lf%lf%lf%lf%lf", &a, &b, &c, &d, &e, &f);
	double y = (c * d - a * f) / (b * d - a * e);
	printf("%.3f %.3f", ((c - b * y) / a, y));
	return 0;
}

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

int main()
{
	float a, b, c, d, e, f;
	int i = 0;
	while (scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f) != EOF)
	{
		float x = ((c * e) - (b * f)) / ((a * e) - (b * d));
		float y = ((a * f) - (c * d)) / ((a * e) - (b * d));
		printf("%.3f %.3f\n", x, y);
	}
}

C++: #include<iostream>
#include<stdio.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=(double)((e*c-b*f)/(a*e-b*d));
    y=(double)((-(d*c)+a*f)/(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>

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

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

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

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

using namespace std;

int main() {

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

	while(cin >> a >> b >> c >> d >> e >> f) {
	
	 float y =(a*f - c*d)/(a*e - b*d);
	 float x =(c*e - b*f)/(a*e - b*d);

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

    return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main()
{
	double a, b, c, d, e, f,y,x;
	while (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));
		if (x == 0){ x = 0.0; }
		if (y == 0){ y = 0.0; }
		printf("%.3lf %.3lf\n", x, y);
	}
}