Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextFloat64() (float64, error) {
	return strconv.ParseFloat(nextString(), 64)
}

func mathRound(f float64) float64 {
	return math.Floor(f + .5)
}

func round(x float64) float64 {
	if math.Abs(x) < 0.001 {
		return 0
	}
	return mathRound(x*1000) / 1000
}

func main() {
	scanner.Split(bufio.ScanWords)
	for {
		a, err := nextFloat64()
		if err != nil {
			break
		}
		b, _ := nextFloat64()
		c, _ := nextFloat64()
		d, _ := nextFloat64()
		e, _ := nextFloat64()
		f, _ := nextFloat64()

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

		fmt.Printf("%.3f %.3f\n", round(x), round(y))
	}
}

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", floor(x * 1000.0) / 1000.0, floor(y * 1000.0) / 1000.0);
  }
  return 0;
}

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

int main(){
    int a,b,c,d,e,f;
    while (cin>>a>>b>>c>>d>>e>>f) {
        double y = (a*f - c*d)/(a*e - b*d);
        double x = (c - b * y)/a;
        int tmp = (x + 0.0005)*1000;
        x = tmp / 1000;
        tmp = (y + 0.0005) * 1000;
        y = tmp / 1000;
        cout<<x<<" "<<y<<endl;
    }
    return 0;
}

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

int main(void){
  int 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) (a*f-d*c)/(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>
#include <iostream>
using namespace std;
int main(){
	/*ax+by=c
	 *dx+ey=f
	 *
	 *aex+bey=ce
	 *bdx+bey=bf
	 *(ae-bd)x=ce-bf
	 *x=(ce-bf)/(ae-bd)
	 *
	 *adx+bdy=dc
	 *adx+aey=af
	 *(bd-ae)y=dc-af
	 *y=(dc-af)/(bd-ae)*/
	int a,b,c,d,e,f;
	while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)!=EOF){
		printf("%.3lf %.3lf\n",(double)(c*e-b*f)/(a*e-b*d)+0.00049999,(double)(d*c-a*f)/(b*d-a*e)+0.00049999);
	}
	return 0;
}

C++: #include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

int sign(int a){
    if(a >= 0)
        return 1;
    return -1;
}

int main()
{
    const int TMP = 10000;
    for(;;){
        int a,b,c,d,e,f;
        if(!(cin >> a >> b >> c >> d >> e >> f))
            return 0;
        int x = TMP * (c*e - b*f) / (a*e - b*d);
        int y = TMP * (c*d - a*f) / (b*d - a*e);
        if(abs(x) % 10 >= 5)
            x += 10 * sign(x);
        if(abs(y) % 10 >= 5)
            y += 10 * sign(y);
        x /= 10;
        y /= 10;
        printf("%d.%04d %d.%04d\n", x/TMP, abs(x)%TMP, y/TMP, abs(y)%TMP);
    }
}

C++: #include <string>
#include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <utility>
#include <vector>
#include <iomanip>


using namespace std;


int main(void) {
	int a, b, c, d, e, f;
	float x, y;
	while(cin >> a >> b >> c >> d >> e >> f){
		x = round((float)(c*e - b*f) / (a*e - b*d) * 1000) / 1000;
		y = round((float)(a*f - c*d) / (a*e - b*d) * 1000) / 1000;
		if(abs(x) < 0.0005)x = 0.0;
		if(abs(y) < 0.0005)y = 0.0;
		printf("%.3f %.3f\n", x, y);
	}
}

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

int main()
{
    using namespace std;
    double a, b, c, d, e, f, x, y;
    cout.precision(3);
    cout << fixed << showpoint;
    while (cin >> a >> b >> c >> d >> e >> f) {
        double coef = d/a;
        b *= coef; c *= coef;
        y = (c - f)/(b - e); y = round(y*1000)/1000;
        x = (c - b*y)/a; x = round(x*1000)/1000;
        cout << x << " " << y << endl;
    }
}

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

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

	while(cin >> a >> b >> c >> d >> e >> f){
		float x, y;
		x = (float)(b*f - c*e)/(b*d -a*e);
		y = (float)(c - a*x)/b;
		cout << x << " " << y << endl;
	}
	return 0;
}

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

using namespace std;

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

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

    if (x == -0) x = 0;
    else if (y == -0) y = 0;
    printf("%.3f %.3f\n", x, y);
  }
}

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;
}

C++: #include<iostream>
#define EPS 1e-10
using namespace std;


int main()
{

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

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

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

  return 0;
}

C++: #include<iostream>

using namespace std;

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

C++: #include <cstdio>
int main() {
 double a,b,c,d,e,f;
 while(scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f)!=EOF){
  prinff("%f %f\n",(c * e - b * f) / (a * e - b * d),(a*f-d*c)/(a*e-b*d));
 };
 return 0;
};

C++: #include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <utility>
#include <functional>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <climits>
using namespace std;
inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v;}
template<class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str();}
typedef vector<int> vi;
typedef vector<vi>  vvi;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef long long ll;
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define EACH(t,i,c) for(t::iretator i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define FOR(i,a,b) for(int i=(a);i<=(b);++i)
#define REP(i,n) FOR(i,0,n-1)
const double EPS = 1e-10;
const double PI = acos(-1.0);

int main() {
	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);
		if(c*e-b*f == 0) {
			x = 0;
		}

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

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

	return 0;
}

C++: 
#include<stdio.h>
#include<math.h>
int main(void){
    double a,b,c,d,e,f,A,x,y,X,Y,Z;

    while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)!=EOF){
    A=a;
    a=a*d,b=b*d,c=c*d;
    d=d*A,e=e*A,f=f*A;

    Y=b-e,Z=c-f;
    y=Z/Y;
    x=(c-y*b)/a;
    x=x+0.0005,y=y+0.0005;
    x=x*1000,y=y*1000;
    x=floor(x);
    y=floor(y);
    x=x/1000,y=y/1000;

   printf("%.3lf %.3lf\n",x,y);
    }
   // printf("\na%lf\nb%lf\nc%lf\nd%lf\ne%lf\nf%lf\n%lf\n%lf",a,b,c,d,e,f,Y,Z);


    }