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>

int main(void){
	double x=0,y=0;
	int a=0,b=0,c=0,d=0,e=0,f=0,i=0,j;
    
    while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f) != EOF)
	{
		y = ( c * d - a * f ) / ( b * d - e * a );

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

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

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

int main()
{
    int a,b,c,d,e,f,t,u,v;
    vector<int> x(0),y(0);
    while (cin>>a>>b>>c>>d>>e>>f)
    {
        x.push_back(0);
        y.push_back(0);
        t=a; u=b; v=c;
        a*=d;  b*=d; c*=d;
        d*=t; e*=t; f*=t;
        y[y.size()-1]=(c-f)/(b-e);
        x[x.size()-1]=(v-u*y[y.size()-1])/t;
    }
    for (int i=0; i<x.size(); i++)
    {
        cout<<x[i]<<".000 "<<y[i]<<".000\n";
    }
    return 0;
}

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

int a, b, c, d, e, f;
double x, y;

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

	return 0;
}

C++: #include<iostream>
#include<stdio.h>
using namespace std;
main(){
  double a,b,c,d,e,f;
  double x=0,y=0;
  while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f) != EOF){
	y=(c*d-a*f)/(b*d-a*e);
	x=(c-b*y)/a;
	printf("%.3f %.3f\n",x,y);
  }
}

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

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

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

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

int main()
{
	double x[2],y[2],z[2];
	double X,Y;

	while(cin >> x[0] >> y[0] >> z[0] >> x[1] >> y[1] >> z[1]){
		y[0] *= x[1];	z[0] *= x[1];
		y[1] *= x[0];	z[1] *= x[0];

	
		Y = (z[0]-z[1]) / (y[0]-y[1]);

		y[0] /= x[1];
		z[0] /= x[1];
		z[0] -= y[0] * Y;

		X = z[0]/x[0];

		cout << X << " "<< Y << endl;

	}
	return 0;
}

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

C++: #include <functional>
#include <algorithm>
#include <iostream>
#include <sstream>
#include <cstring>
#include <iomanip>
#include <fstream>
#include <climits>
#include <cctype>
#include <cstdio>
#include <string>
#include <vector>
#include <bitset>
#include <queue>
#include <stack>
#include <cmath>
#include <ctime>
#include <deque>
#include <list>
#include <map>
#include <set>
using namespace std;

/*** typedef ***/
typedef long long LL;
typedef unsigned int ui;
typedef unsigned long long ULL;
typedef pair < int , int > ii;
typedef pair < LL  , LL  > ll;
typedef vector <int>  vint;
typedef vector <bool> vbool;
typedef vector <long> vlong;

/*** define ***/
#define sz(x)			((int)x.size())
#define tin(x)			scanf("%d",&x)
#define all(x)			x.begin(),x.end()
#define Set(b,a)		memset(b,a,sizeof b)
#define print1(x)		printf("Case %d:",x++)
#define tin2(x,y)		scanf("%d%d",&x,&y)
#define tin3(x,y,z)		scanf("%d%d%d",&x,&y,&z)
#define loop(i,i0,in)	for(int i=i0 ; i<in ; i++)
#define rep(i,n)		for(int i=0 ; i<(n) ; i++)
#define _rep(i,n)		for(int i=n-1 ; i>=0 ; i--)
#define _loop(i,in,i0)	for(int i=in-1 ; i>=i0 ; i--)
#define Fore(it, x)		for(typeof (x.begin()) it = x.begin(); it != x.end (); it++)
     
int main()  
{  
#ifdef Online_Judge
	freopen("a.in","r",stdin);
#endif
	long long a,b,c,d,e,f;
	while(cin >> a >> b >> c >> d >> e >> f)
	{
		LL x=((c*e) - (b*f))/((a*e)-(b*d));
		LL y=((a*f) - (c*d))/((a*e)-(b*d));
		printf("%I64d.000 %I64d.000\n",x,y);
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main() {
	int i;
	double a[2], b[2], c[2], x, y;
	cin >> a[0] >> b[0] >> c[0] >> a[1] >> b[1] >> c[1];
	if (a[0] == 0) {
		y = c[0] / b[0];
		x = (c[1] - b[1] * y) / a[1];
	}
	else if (b[0] == 0) {
		x = c[0] / a[0];
		y = (c[1] - a[1] * x) / b[1];
	}
	else if (a[1] == 0) {
		y = c[1] / b[1];
		x = (c[0] - b[0] * y) / a[0];
	}
	else if (b[1] == 0) {
		x = c[1] / a[1];
		y = (c[0] - a[0] * x) / b[0];
	}
	else {
		x = (c[1] - c[0] * b[1] / b[0]) / (a[1] - a[0] * b[1] / b[0]);
		y = (c[0] - a[0] * x) / b[0];
	}
	x = x * pow(10,3);
	x = round(x);
	x = x * pow(10, -3);
	y = y * pow(10, 3);
	y = round(y);
	y = y * pow(10, -3);
	cout << x << endl << y << endl;
	return 0;
}

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

const double ep = 1e-10;

int main() {
    int a, b, c, d, e, f, A, B, C;
    double x, y;
    while(cin >> a >> b >> c >> d >> e >> f) {
        A = c*e - b*f;
        B = a*f - c*d;
        C = a*e - b*d;
        x = (double)A/C; y = (double)B/C;
        if(x>-ep && x<ep) x = 0.0;
        if(y>-ep && y<ep) y = 0.0;
        printf("%.3f %.3f\n", x, y);
    }
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)

int main()
{
    while(1)
    {
    double a,b,c,d,e,f;
    cin >> a;
    if(cin.eof())break;
    cin >> b;
    cin >> c;
    cin >> d;
    cin >> e;
    cin >> f;
    double det = a*e-b*d;
    double ans1 = (c*e-b*f)/det;
    if(ans1<0.0)ans1 = -ans1;
    double ans2 = (-c*d+a*f)/det;
    if(ans2<0.0)ans2 = -ans2;
    printf("%1.3f %1.3f\n",ans1,ans2);
    }
    return 0;
}

C++: #include <iostream>
#include <cmath>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <sstream>
#include <string>
#include <cstdlib>
using namespace std;

// 一行取って、一番初めのTを習得
template <class T> int streamvar(std::istream& in, T& var)
{
    string s;
    if (!in) {
        return 1;
    }
    getline(in, s);
    istringstream is(s);
    is >> var;
    if (is.fail()) 
        return 1;
    return 0;
}
// 一行取って、T vectorに格納する
template <class T> int streamvec(std::istream& in, std::vector<T> &v)
{
    v.clear();
    string s;

    if (!in) 
        return 1;
    getline(in, s);
    if (in.fail()) 
        return 1;
    istringstream is(s);
    while (1) {
        T tmp;
        is >> tmp;
        if (is.fail())
            break;
        v.push_back(tmp);
    }
    return 0;
}

int main(void)
{
    vector<int> v;
    while (!streamvec(cin, v)) {
        double det = v[0] * v[4] - v[3] * v[1];
        double x = v[4] * v[2] - v[1] * v[5];
        double y = -v[3] * v[2] + v[0] * v[5];
        printf("%.3f %.3f\n", round(x/det*1000)/1000, round(y/det*1000)/1000);
    }
    return 0;
}

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

int main(void){
    double a, b, c, d, e, f;
    
    while(cin >> a >> b >> c >> d >> e >> f){
        double x = (double)(c*e - b*f) / (a*e - b*d);
        double y = (double)(a*f - c*d) / (a*e - b*d);

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