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++: try :
  while True :
    (a,b,c,d,e,f) = map(int, raw_input().split())

    print "%.3f %.3f"%((c*e-b*f)/(a*e-b*d), (a*f-c*d)/(a*e-b*d))
except EOFError :
  pass

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

using namespace std;

int main()
{
    double a, b, c, d, e, f;
    double 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 );

        x = x + ( 0.5 - ( x < 0 ) )/1000;
        y = y + ( 0.5 - ( y < 0 ) )/1000;
        x = int( x * 1000 );
        y = int( y * 1000 );
        if(x != 0) x /= 1000;
        if(y != 0) y /= 1000;

        cout << fixed << setprecision(3)
             << x << ' ' << y
             << endl;
    }
    return 0;
}

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

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

int main(){
double a,b,c,d,e,f,a_,b_,c_,d_,e_,f_;
double x,y;
double in;
while (std::cin >>a>>b>>c>>d>>e>>f){
in = (a*e - b*d);
a_ = a/in;
b_ = -1*d/in;
d = -1*b/in;
e_ = e/in;
x = c * a_ + f*b_;
y = c*d_ + f*e_;
std::cout << std::setprecision(3) << std::fixed << x << ' ' << std::setprecision(3) <<std::<< std::fixed <<  y << std::endl;
}
    return 0;
}

C++: #include<iostream>
#include<iomanip>
using namespace std;
int main()
{
	float a,b,c,d,e,f;
	float 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);
		cout<<setiosflags(ios::fixed);
		cout<<setprecision(3)<<x<<" "<<y<<endl;
	}
	return 0;
}

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

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

C++: #include<iostream>
#include<cstdio>
#include<cctype>
#include<cstring>
#include<string>
#include<algorithm>
#include<queue>
#include<stack>
#include<iomanip>
using namespace std;

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

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

#include <math.h>
using namespace std;

int main()
{
	double A, B, C, D, E, F, X, Y, G , H;

	while(cin >> A >> B >> C >> D >> E >> F)
	{
		G = A / D;
		D *= G;
		E *= G;
		F *= G;
		Y = (F-C) / (E-B);
		
		D /= G;
		E /= G;
		F /= G;
		H = B / E;
		D *= H;
		E *= H;
		F *= H;
		X = (F-C) / (D-A);

		if(X==0){X=0;};
		if(Y==0){Y=0;};

		printf("%.3f %.3f\n",X,Y);
	}

	return 0;
}

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 = (c * e - b * f) / (a * e - b * d);
    y = (a * f - c * d) / (a * e - b * d);
    printf("%.3f %.3f\n", x, y);

  }
}

C++: // 失敗するからこそ そこから立ち向かって行く強さがあってそんな強さが本当の強さだと私は思うから
#ifdef DAIJOBU
#include "/home/v-o_o-v/deb.h"
#define deb(x...) cerr << "[" << #x << "] = ["; _print(x)
#else
#include <bits/stdc++.h>
#define deb(x...)
#endif 

using namespace std;

int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);

	int a, b, c, d, e, f;
	while(cin >> a >> b >> c >> d >> e >> f){
		int num_x = c * e - b * f, den_x = a * e - b * d;
		int num_y = c * d - a * f, den_y = b * d - a * e;
		long double X, Y;
		if(num_x == 0)X = 0.0;
		else X = num_x / (long double)den_x;
		if(num_y == 0)Y = 0.0;
		else Y = num_y / (long double)den_y;
		cout << fixed << setprecision(3);
		cout << X << ' ' << Y << '\n';
	}
	return 0;
}
// Write Here

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

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

	
	while (scanf( "%d%d%d%d%d%d" ,&a,&b,&c,&d,&e,&f) )
	
	{
		double y=(double)(c*d-a*f)/(double)(b*d-a*e);
		if(a!=0)
		
		printf("%.3f %.3f\n",(c-b*y)/a,y);
		else
		printf("%.3f %.3f\n",(f-e*y)/d,y);
	}

    return 0;
    
    }

C++: #include <iostream>

using namespace std;

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;
		
		dx =x -  (x / 0.001)*0.001;
		if( dx >= 0.0005)
			x = (x / 0.001)*0.001 + 0.001;
		else
			x = (x / 0.001)*0.001;

		dy =y -  (y / 0.001)*0.001;
		if( dy >= 0.0005)
			y = (y / 0.001)*0.001 + 0.001;
		else
			y = (y / 0.001)*0.001;
	
		printf("%.3f %.3f\n",x,y);
	}



	return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define mp make_pair
#define it ::iterator
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double ESP=1e-10;
using namespace std;
int main(){
  double a,b,c,d,e,f;
  while(cin>>a){
    cin>>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);
    if(x==0)x=0;
    if(y==0)y=0;
    printf("%.3f %.3f\n",x,y);
  }
}

    
    /*
      ey=f-dx
      y=(f-dx)/e
      ax+b(f-dx)/e=c
      aex+df-bdx=ce
      (ae-bd)x=ce-df
      x=(ce-df)/(ae-bd)

  y=(f-dx)/e
  y=(f



a b  x  c
d e  y  f

x  c  e -b
y  f  -d a  /(ae-bd)*/

C++: #include<iostream>
#include<cstdio>
#include<iomanip>
#include<vector>
using namespace std;
class SimultaneousEquation{ 
    public:
        void solve(int a,int b,int c,int d,int e,int f){ 
            double x,y;
            x=double(a*e-b*d)/(c*e-b*f);
            y=double(c*d-a*f)/(b*d-a*e);
            printf("%.3lf %.3lf\n",x,y);
            }
};
int main(){ 
    int a,b,c,d,e,f;
    SimultaneousEquation inst;
    while(cin>>a>>b>>c>>d>>e>>f){
        inst.solve(a,b,c,d,e,f);
    }
}

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

void OutputSolution(int a, int b, int c, int d, int e, int f)
{
    double x, y;
	if(a == 0){
		y = c / b;
		x = (f-e*y) / d;
	}else{
		int A = a;
		a *= d;
		b *= d;
		c *= d;
		d *= A;
		e *= A;
		f *= A;
		y = (c-f) / (b-e);
		x = (c-b*y) / a;
	}
	cout << fixed << setprecision(3) << x << ' ' << y << endl;
}

int main()
{
	while(true){
		int a, b, c, d, e, f;
		cin >> a >> b >> c >> d >> e >> f;
		if(cin.eof()) break;
		OutputSolution(a, b, c, d, e, f);
	}
	return 0;
}

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