Go: package main

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

var sc = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)

func main() {
	sc.Split(bufio.ScanWords)
	defer out.Flush()
	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 float64(((c * e) - (b * f)) / ((a * e) - (b * d)))
}

func GetY(a, b, c, d, e, f float64) float64 {
	return float64(((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>
#include <cstdio>
using namespace std;
#define j bai;
int main() {
	double a, b, c, d, e, y, x, f, bai;
	bool bo = false;
	while (cin >> a >> b >> c >> d >> e >> f) {
		if (a ==0 || b ==0) {
			if (a) {
				y = c / b;
				x = f / d - e*y;
			}
			else if (b) {
				x = a / c;
				y = f / e - d*x;
			}
			bo = true;
		}
		else if (d == 0 || e == 0) {
			if (d) {
				y = f / e;
				x = c / a - d*y;
			}
			else if (e) {
				x = f / d;
				y = f / e - d*x;
			}
			bo = true;
		}
		
		else if (a < d) {
			bai = d / a;
			a *= j;
			b *= j;
			c *= j;
		}
		else {
			bai = a / d;
			d *= j;
			e *= j;
			f *= j;
		}
		if (((a > 0 && d < 0) || (a < 0 && d>0)) && bo==false) {
			y = (c + f) / (b + e);
			x = (c - b*y) / a;
		}
		else if (bo == false) {
			y = (c - f) / (b - e);
			x = (c - b*y) / a;
		}
		printf("%.3lf %.3lf\n", x, y);
	}
	return 0;
}

C++: /*
    ????????°??§???????????¨????????????
*/

#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <limits.h>
#include <iostream>
#include <algorithm>
#include <string>
#include <iterator>
#include <vector>
#include <map>
#include <utility>
#define LLU unsigned long long int
#define LL long long int
#define LD long double
using namespace std;
#define LLUmax ULLONG_MAX
#define LLmax LLONG_MAX
#define dmax INT_MAX
#define vd vector<int>
#define vLL vector<long long int>
#define vLLU vector<unsigned long long int> 
#define pb push_back
#define mp make_pair
#define fi first
#define sec second
#define debug printf("asd\n")
#define debugd(a) printf("--%d\n",a)
#define debugdd(a,b) printf("--%d %d\n",a,b)
#define debugarr(a,b) for(int i=0 ; i<b ; i++)printf("%d ",a[i]);printf("\n")
#define newline printf("\n")
#define forin(a,b,c) for(int a=b ; a<c ; a++)
#define forde(a,b,c) for(int a=b ; a<c ; a--)


inline void scd(int &a){scanf("%d",&a);}
inline void scdd(int &a,int &b){scanf("%d %d",&a,&b);}
inline void sctd(int &a,int &b,int &c){scanf("%d %d %d",&a,&b,&c);}
inline void scdlld(long int &a,long int &b){scanf("%I64d %I64d",&a,&b);}
inline void sclld(long long int &a){scanf("%I64d",&a);}

#define scarrd(a,b) for(int index=0 ; index<b ; index++)scanf("%d",&a[index])
#define prdlld(a,b) printf("%I64d %I64d",a,b)
#define prdd(a,b) printf("%d %d",a,b)
#define prd(a) printf("%d",a)
#define prarr(a,b) for(int i=0 ; i<b ; i++)printf("%d ",a[i])
#define iniarr(a,b) for(int i=0 ; i<b ;i++)a[i]=0
#define arr(a,b) int *a=(int *)malloc(b*sizeof(int))
#define llarr(a,b) long long int *a=(long long int *)malloc(b*sizeof(long long int))
#define st(a,b) char *a=(char *)malloc(b*sizeof(char))
#define grav 9.8
#define pi 3.14159265

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

C++: #include <cstdio>

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

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

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

using namespace std;

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

while(a){
cin >> a >> b>> c>> d>> e>> f;
double x, y;
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>

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

using namespace std;

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

    while (cin >> a >> b >> c >> d >> e >> f) {
        int det = a * e - b * d;
        double x = (e * c - b * f) / det;
        double y = (a * f - d * c) / det;
        printf("%.3f %.3f", x + 0.0, y + 0.0);
    }

    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, y;
		x=(c*e-b*f)/(a*e-b*d);
		y=(a*f-c*d)/(a*e-b*d);
		if(x>-0.001 && x<=0) x=0;
		if(y>-0.001 && y<=0) y=0;

		cout.setf(ios::fixed);
		cout.precision(3);
		cout << x << " " << y << endl;
	}
	return 0;
}

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

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

using namespace std;

int main(){
   double a,b,c,d,e,f;
   double x,y;
   int 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 = static_cast<int>(x*10000);
      if(X%10>=5){
         X += 10 - (X%5);
         x = static_cast<double>(X /10000);
      }
      Y = static_cast<int>(y*10000);
      if(Y%10>=5){
         Y += 10 - (Y%5);
         y = static_cast<double>(Y /10000);
      }
      printf("%.3lf %.3lf\n",x,y);
      
   }
   return 0;
}

C++: #include<iostream>
#include<iomanip>
#include<cmath>
#include<algorithm>
#include<string>
#include<cctype>
#include<vector>
#include<queue>
#include<map>
using namespace std;

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

	while (cin >> a >> b >> c >> d >> e >> f) {
		G = 1 / (a*e - b*d);
		x = G*(e*c + (-b)*f);
		y = G*((-d)*c + a*f);
		cout << fixed << setprecision(3) << x << " " << y << endl;
	}

	return 0;
}

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

using namespace std;
int main() {
    float a,b,c,d,e,f,x;
    while(cin >> a){
        cin >> b;
        cin >> c;
        cin >> d;
        cin >> e;
        cin >> f;
        a /= b;
        c /= b;
        x = (f-e*c)/(d-a*e);
        printf("%.3f %.3f\n",x,c-a*x );

    }
    return 0;

}