Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Split(bufio.ScanWords)
	for {
		data := nextInts(6)
		if data[0] == 0 || data[1] == 0 || data[2] == 0 || data[3] == 0 || data[4] == 0 || data[5] == 0 {
			break
		}
		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 ((c * e) - (b * f)) / ((a * e) - (b * d))
}

func GetY(a, b, c, d, e, f float64) float64 {
	return ((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 <bits/stdc++.h>
#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;
		}
		if (x == -0.000) {
			x = abs(x);
		}
		if (y == -0.000) {
			y = abs(y);
		}
		printf("%.3f %.3f\n", x, y);
	}
	return 0;
}

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

using namespace std;

/*
aX+bY=c
dX+eY=f
*/

void solve(int a, int b, int c, int d, int e, int f) {
	double x = (f - e*c/b) / (d - e*c/b);
	double y = (c - a*x) / b;
	printf("%4f %4f\n", x, y);
}

int main() {
	int a, b, c, d, e, f;
	while (cin >> a >> b >> c >> d >> e >> f) {
		solve(a,b,c,d,e,f);
	}
	return 0;
}

C++: #include<stdio.h>
#include<algorithm>
using namespace std;
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 = (c*d-f*a)/(b*d-a*e);
			x = (c-b*y)/a;
			printf("%.3f %.3f\n",x ,y);
		 }
		 return 0;
}

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

int main(){
  int n[6];
 
  while(cin>>n[0]>>n[1]>>n[2]>>n[3]>>n[4]>>n[5]){

  float a,b,c;
  float x,y;
  a = (float)n[0]/(float)n[3];
  b = -n[4]*a;
  c = -n[5]*a;
  
  a = n[1] + b;
  b = n[2] + c;
  y = b/a;
  x = (n[2]-n[1]*y)/n[0];

  cout << x << ' ' << y << endl;
}
  return 0;
}

C++: #include <stdio.h>
#include <vector>
#include <utility>
#include <algorithm>
#include <iostream>
#include <limits>
#include <iomanip>
using namespace std;
#define rep(i,n) for(int i=0;i<n;++i)
#define ld long double
ld a, b, c, d, e, f, x, y;
ld shish(ld a)
{
	a *= 1000;
	a += 0.501;
	a = (ld)((int)a);
	a /= 1000;
	cout << a << endl;
	return a;
}
int main() {
	while (cin >> a >> b >> c >> d >> e >> f) {
		y = (a*f - c*d) / (ld)(a*e - b*d);
		x = (c*e - f*b) / (ld)(a*e - b*d);
		x = shish(x);
		y = shish(y);
		cout << fixed;
		cout << setprecision(std::numeric_limits<double >::max_digits10) << x;
		cout << " ";
		cout << fixed;
		cout << setprecision(std::numeric_limits<double >::max_digits10) << y;
		cout << endl;
	}
}

C++: #include <cstdio>

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

  while (scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f)) {
    int div = a;
    a /= div, b /= div, c /= div;
    int time = -d;
    d += a * time, e += b * time, f += c * time;
    double y = f / e;
    double x = c - b * y;
    printf("%.3f %.3f\n", x, y);
  }
  return 0;
}

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

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

	return 0;
}

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

int main(){
	double a,b,c,d,e,f,x,y;
	while(cin >> a >> b >> c >> d >> e >> f){
		cout << (c*e-b*f)/(a*e-b*d) <<" "<< (c*d-a*f)/(b*d-e*a) <<"\n";
	}
	
return 0;
}

C++: #include <stdio.h>

int main()
{
	double a,b,c,d,e,f;
	while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f) != EOF)
	{
		double det = a*e-b*d;
		printf("%0.3f %0.3f\n",(c*e-f*b)/det,(a*f-d*c)/det);
	}
	return 0;
}

C++: #include<iostream>
#include<cstdio>
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-f*b)/(a*e-d*b);
        y=(c*d-f*a)/(b*d-e*a);
        if(x>-0.001 && x<0.001)x=0;
        if(y>-0.001 && y<0.001)y=0;
      printf("%1.3f %1.3f\n" ,x,y);
   }
    return 0;
}

C++: #include <cstdio>
#include <iostream>
#include <iomanip>
#include <string>   
using namespace std;
 
int main(){
	double a,b,c,d,e,f,aa,bb,cc,i = 0,x,y;
	cin >> a >> b >> c >> d >> e >> f;
	aa = a;
	bb = b;
	cc = c;
	a = a * d;
	b = b * d;
	c = c * d;

	d = d * aa;
	e = e * aa;
	f = f * aa;

	y = (c - f) / (b - e);
	x = cc - (bb * y);
	x = x / aa;
    cout << fixed << setprecision(3) << x << " " << fixed << setprecision(3) << y << endl;
}

C++: // 解二元一次方程组 
#include<iostream>
#include<iomanip>
using namespace std;

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

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

using namespace std;

double delta(double o, double p, double q , double r, double s, double t) {

	//cout << "o=" << o << "s=" << s << "v=" << "r=" << "o*s-p*r=" << (o*s-p*r)  << endl;

	// |o  p ||x|   |q|
	// |r  s ||y| = |t|

	return (o*s-p*r);//a???o b???p c???q d???r e???s f???t
}

double deltacfbe(double o, double p, double q , double r, double s, double t) {

	//cout << "o=" << o<< "s=" << s << "p=" << "r=" << "q*s-p*t=" << q*s-p*t  << endl;

	// x = |q  p | /delta
	//     |t  s | 

	return (q*s-p*t);
}

double deltaadcf(double o, double p, double q , double r, double s, double t) {

	//cout << "o=" << o<< "s=" << s << "p=" << "r=" << "o*t-q*r=" << o*t-q*r  << endl;

	// y = |o  q | /delta
	//     |r  t | 

	return (o*t-q*r);
}

int main() {

	double a, b, c, d, e, f;
	
	while (cin >> a >> b >> c  >> d >> e >> f){

	cout << setprecision(3) << (deltacfbe(a,b,c,d,e,f)/delta(a,b,c,d,e,f))  << " " << (deltaadcf(a,b,c,d,e,f)/delta(a,b,c,d,e,f)) << endl;
	
	}

	return 0;
}