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)
		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 <stdio.h>

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

    while(scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f) != EOF)
    {
        x =(c*e - b*f)/(a*e - b*d);
        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);

        
    }
    return 0;
}

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 = (c * d - a * f) / (b * d - a * e);
    x = (c - b * y) / a;
    cout << fixed << setprecision(3) << x << " " << y << endl;
  }
  return 0;
}

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

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) {
        x = (c * e - b * f) / (a * e - b * d);
        y = (c - a * x) / b;
        cout << fixed << setprecision(3) << x << " " << y << endl;
    }
    return 0;
}

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

using namespace std;

int main (void) {
    int a, b, c, d, e, f;
    double x, y;
    while (1) {
        cin >> a;
        cin >> b;
        cin >> c;
        cin >> d;
        cin >> e;
        cin >> f;
        if (cin.eof()) break;
        x = (double)(c * e - b * f) / (double)(a * e - b * d);
        y = (double)(c * d - a * f) / (double)(b * d - a * e);
        if (x == -0.0) x = 0.0;
        if (y == -0.0) y = 0.0;
        cout << fixed << setprecision(3) << x << ' ' << y << endl;
    }
    return 0;
}

C++: #include <iostream>

using namespace std;

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

int main()
{
	solve();
	return(0);
}

C++: #include <iostream>
#include <stdio.h>
#include <string>
#include <math.h>
#include <algorithm>
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 - d*c) / (e*a - b*d);

  if(x == 0){
    x = 0;
  }
  if(y == 0){
    y = 0;
  }

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

 return 0; 
}

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

using namespace std;

int main(){
  double a,b,c,d,e,f;
  vector<double> al,bl,cl,dl,el,fl;
  double x,y,n,m;

  while(cin >> a >> b >> c >> d >> e >> f){
    al.push_back(a);
    bl.push_back(b);
    cl.push_back(c);
    dl.push_back(d);
    el.push_back(e);
    fl.push_back(f);
  }

  for(int i=0; i<al.size(); i++){
    n = bl[i]/el[i];
    m = al[i]/dl[i];
    x = (cl[i]-n*fl[i])/(al[i]-n*dl[i]); 
    y = (cl[i]-m*fl[i])/(bl[i]-m*el[i]);
    cout << setprecision(3) << fixed << x << " " << y << endl;
  }

  return 0;
}

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

int main(){
	
	int 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));
		
		/*x *= 1000;
		y *= 1000;
		
		round(x);
		round(y);
		
		x /= 1000;
		y /= 1000;
		*/
		printf("%.3lf %.3lf\n",x,y);
	}
	
	return 0;
}

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){
		x=(f-c*e/b)/(d-a*e/b);
		y=(f-c*d/a)/(e-b*d/a);

		cout << fixed << setprecision(4) << x << " " << y << endl;
	}

	return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<stdio.h>
using namespace std;
int main(){
	int a,b,c,d,e,f;
	int o,p,q,r,s,t;
	float x,y;
	while(scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f)!=EOF){
		o=a;p=b;q=c;r=d;s=e;t=f;
		o*=d;p*=d;q*=d;
		r*=a;s*=a;t*=a;
		//printf("%d %d %d %d %d %d \n",o,p,q,r,s,t);
		p-=s;
		q-=t;
		if(q==0){
			y=0;
		}
		else{
		y=(float)(q/p);
		}
		int g=(int)(e*y);
		g*=-1;
		x=(float)((f+g)/d);
		printf("%.3f %.3f\n",x,y);
	}
}

C++: #include<iostream>
#include<iomanip>
using namespace std;
int main(){
	double a,b,c,d,e,f,x,y,dummy;
	while(cin>>a>>b>>c>>d>>e>>f){
		dummy=b;
		a*=e;
		b*=e;
		c*=e;
		d*=dummy;
		e*=dummy;
		f*=dummy;
		x=((c-f)/(a-d));
		y=((c-a*x)/b);
		cout<<fixed<<setprecision(4)<<x<<" "<<y<<"\n";
	}
	return 0;
}

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

double getValue(double val);

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

double getValue(double val)
{
    double result;
    val *= 1000;
    if(val >= 0.0){
        result = (int)(val + 0.5);
    }
    else{
        result = (int)(val - 0.5);
    }
    return result / 1000;
}

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

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

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

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

int main(void)
{
	int n;
	double a,b,c,d,e,f;
	double det, ia, ib, ic, id;
	double x,y;
	char buf[32];
	while(fgets(buf,32,stdin)!=NULL){
		n=sscanf(buf,"%lf %lf %lf %lf %lf %lf",&a,&b,&e,&c,&d,&f);
		if(n!=6)break;
		det = 1./(a*d - b*c);
		ia=d*det;
		ib=-b*det;
		ic=-c*det;
		id=a*det;
		x=ia*e+ib*f;
		y=ic*e+id*f;
		printf("%.3f %.3f\n", round(x*1000)/1000,round(y*1000)/1000);
	}
	return 0;
}

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)
	{
		if (cin.eof()) break;
		y = (c*d - a*f) / (b*d - a*e);
		x = -b/a * y + c/a;
		cout << setprecision(3) << setiosflags(ios::fixed) << x << " " << y << endl;
	}
	return 0;
}