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 <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
using namespace std;

typedef long long ll;
typedef pair<int, int> P;

#define all(c) (c).begin(), (c).end()
#define pb push_back
#define mp make_pair
#define EXIST(v,i) (find(all(v), i) != (v).end())
#define ERASE(v,i) (v).erase(remove(all(v), i), (v).end())
#define INDEX(v,i) (find(all(v), i) - (v).begin())
#define rep(i,n) for(int i = 0; i < (int)n; ++i)
#define debug(x) cerr << #x << " = " << (x) << endl;

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

const int INF = 100000000;
const double PI = 3.14159265358979323846;
const double EPS = 1e-10;

int main() {
	string line;
	while(getline(cin, line)) {
		double a, b, c, d, e, f;
		{
			istringstream is(line);
			is >> a >> b >> c >> d >> e >> f;
		}
		double multi = d / a;
		a *= multi;
		b *= multi;
		c *= multi;
#if 0
		debug(a)
		debug(b)
		debug(c)
		debug(d)
		debug(e)
		debug(f)
#endif
		double ny = b - e;
		double nr = c - f;
		double ay = nr / ny;
		double ax = (c - b * ay) / a;
		if(ax == -0.0) ax = 0.0;
		if(ay == -0.0) ay = 0.0;
		printf("%.3f %.3f\n", ax, ay);
	}
	return 0;
}

C++: #include <iostream>

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 - a*x) / b;

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

C++: #include<iostream>
using namespace std;
int main() {
return 0;
}

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

int main(){
  int i;
  float x[6];
  int y1, y2, re1, re2;

  while(cin >> x[0]){
    for(i=1; i<6; i++){
      cin >> x[i];
    }

    //normalize
    x[1]/=x[0]; x[2]/=x[0]; x[0]=1;

    //subtraction
    x[4]-=x[3]*x[1]; x[5]-=x[3]*x[2]; x[3]=0;

    //normalize
    x[5]/=x[4]; x[4]=1;

    //subtraction
    x[2]-=x[1]*x[5]; x[1]=0;

    y1=(int)(x[2]*10000); y2=(int)(x[5]*10000);
    re1=y1%10; re2=y2%10;
    if(re1<5) y1-=re1;
    else y1+=10-re1;
    if(re2<5) y2-=re2;
    else y2+=10-re2;
    printf("%f %f\n", (float)y1/10000.0f, (float)y2/10000.0f);
  }

  return 0;
}

C++: const int tt = 10000;

#include<iostream>
#include<string>
#include<sstream>
using namespace std;

string toStr(int n);
string intToString(int n);

int main() {
  int a, b, c, d, e, f;
  
  while(cin >> a >> b >> c >> d >> e >> f) {
    c = c * tt;
    f = f * tt;

    int det = a * e - b * d;

    int x = ( e * c - b * f) / det;
    int y = (-d * c + a * f) / det;
//    cout << x << y << endl;

    cout << toStr(x) << " " << toStr(y) << endl;
  }
}

string toStr(int n) {
  string pm, val;
  
  if (n < 0) {
    pm = "-";
    n = -n;
  } else {
    pm = "";
  }

  int ipart = n / tt;
  int fpart = (n - ipart * tt) + tt + 5;

  val = pm + intToString(ipart) + "." + intToString(fpart).substr(1, 3);
  return val;
}

string intToString(int n) {
  stringstream ss;
  ss << n;
  return ss.str();
}

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

using namespace std;

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

C++: #include <stdio.h>
#include <vector>
#include <utility>
#include <algorithm>
#include <iostream>
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.5;
a=int(a);
a/=1000;
}
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=sihsh(y);
    printf("%.3f "  , x); printf("%.3f"  , y); 
    cout<<endl;
  }
}

C++: #include<stdio.h>

int main(void)
{
	int a,b,c,d,e,f,t=0,n,cx,cy;
	double x[100]={0},y[100]={0};
	
	while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)!=EOF)
	{
		x[t]=(c*e-b*f)/(a*e-b*d);
		y[t]=(d*c-a*f)/(b*d-a*e);
		t++;
	}

	for(n=0;n<t;n++)
	{
		printf("%.3lf %.3lf\n",x[n],y[n]);
	}
	return 0;
}

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

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

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

int main(){
	
	double a, b, c, d, e, f;
	// input
	while(std::cin >> a >> b >> c >> d >> e >> f){
		
		/*	solve the equation
		*	y = (f - d*x) / e
		*	x = (c*e - b*f) / (a*e - b*d)
		*/
		double x = (c*e - b*f) / (a*e - b*d);
		double y = (a*f - c*d) / (a*e - b*d);
		
		// need this process for submitting
		if(x == -0)	x = 0.0;
		if(y == -0)	y = 0.0;
		// output
		std::cout << std::fixed << std::setprecision(3) << x << " " << y << std::endl;
	}
	
	return 0;
}

C++: #include <stdio.h>

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

C++: #include <cstdio>
#include <stdlib.h>
#include <math.h>

float a,b,c,d,e,f;
double    round( double val, int precision )
{
    double    ret;
    char    buf[256] = {'\0'};
    char    *p;

    sprintf( buf, "%.*f", precision, val );
    ret = strtod( buf, &p );

    return ret;
}
int main (){
  scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f);
  double x,y;
  x=(f*b/e-c)/(d*b/e-a);
  y=(f*a/d-c)/(e*a/d-b);
 round(x,4);
 round(y,4);
if(x/1000== -0.000) x=0.000;
if(y/1000== -0.000) y=0.000;
  printf("%.3f %.3f\n",x,y);
}

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

double sisyagonyu(double num, int keta){

    if(keta < 1)return num;
    
    int i  = num * pow(10, keta);
    int sg = num * pow(10, keta + 1) - i * 10;
    
    
    if(sg >= 5)i++;
    else if(sg <= -5)i--;

    return i / pow(10.0, keta);
};

int main(){

    double a,b,c,d,e,f;
    double x,y;
    
    while(cin){
        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) << setprecision(3);
        cout << sisyagonyu(x, 3) << ' ' <<  sisyagonyu(y, 3)  << endl;
     }
         
	return 0;
}