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 <iostream>
#include <stdio.h>
using namespace std;

int main() {

//変数の宣言

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

	while(1){
		cin >>a>>b>>c>>d>>e>>f;
	
		if (a==0){
			y = c / b;
			x = (f - (e*c/b)) / d;
		}else if(b==0){
			x = c / a;
			y = (f - (d*c/a)) / e;
		}else if(d==0){
			y = f / e;
			x = (c - (b*f/e)) / a;
		}else if(e==0){
			x = f / d;
			y = (c - (a*f/d)) / b;
		}else{
			x = (f - (e*c/b)) / (d - (e*a/b));
			y = (f - (d*c/a)) / (e - (d*b/a));
		}
		printf("%.3f %.3f",x,y);
	}
	return 0;
}

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

using namespace std;
float a,b,c,d,e,f;
float findoutx,findouty;
float x,y,yadd;
float Timers1,Timers2;
int main()
{
    while((cin >> a >> b >> c >> d >> e >> f)!=EOF)
    {
    Timers1 = a;
    Timers2 = d;
    a=a*Timers2;
    b=b*Timers2;
    c=c*Timers2;
    d=d*Timers1;
    e=e*Timers1;
    f=f*Timers1;

    findouty=b-e;
    yadd = c-f;
    findouty = yadd/findouty;
    b = b*findouty;
    findoutx=(c-b)/a;

    if(findoutx==0)findoutx=0;
    if(findouty==0)findouty=0;



    cout<<fixed<<setprecision(3)<<findoutx << " "<<findouty<<endl;
    }

return 0;
}

C++: #include<iostream>
#include<math.h>

double a, b, c, d, e, f;
int main()
{
	while(std::cin>>a>>b>>c>>d>>e>>f)
	{
		double x = (e*c-b*f)/(a*e-b*d);
		double y = (-d*c+a*f)/(a*e-b*d);
		x=(int)(x*1000+0.5)/1000;y=(int)(y*1000+0.5)/1000;
		

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

C++: 
/* vo05_04.cpp */
#include <iostream>
#include <cstdio>
using namespace std;

double m_round(double d);

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

	while (true) {

		cin >> a >> b >> c >> d >> e >> f;
		if (cin.eof()) break;

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

		x = m_round(x); y = m_round(y);

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

	return 0;
}

double m_round(double d)
{
	if (d == 0) { d = 0; return d; }

	bool flag = false;
	if (d < 0) { flag = true; d = -d; }

	d *= 1000;
	d += 0.5;

	int t1 = (int)d;
	double t2 = d - (double)t1;
	d -= t2;

	d /= 1000;

	if (flag) { d = -d; }

	return d;
}

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

int main() {

     
    double a, b, c, d, e, f;

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

    return 0;
}

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

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

C++: #include <iostream>
#include <algorithm>
#include <set>
#include <vector>
#include <sstream>
#include <typeinfo>

using namespace std;

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

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

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

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

  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);
 
  } 
  return 0;
}

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

using namespace std;

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

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

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

}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main()
{
   int a,b,p,c,d,q;
   float x,y;
   while(cin >> a >> b >> c >> d >> e >> f)
   {
      x=(float)(d*p-b*q) / (a*d - b*c);
      y=(float)(a*q-c*p) / (a*d - b*c);
      x *= 1000;
      x +=0,5;
      x = (int)x;
      x /= 1000;
      y *= 1000;
      y +=0,5;
      y = (int)x;
      y /= 1000;
      printf("%.3f %.3f\n" ,x,y);
   }
    return 0;
}

C++: #include <iostream>
#include <stdlib.h>
#include <string.h>
#include <sstream>
#include <iostream>
#include <math.h>
#include <iomanip>

using namespace std;

string float_to_string(float f, int digits)
{
  if (f == 0) {
    f = 0;
  }
  ostringstream oss;
  oss << setprecision(digits) << setiosflags(ios::fixed) << f;
  return oss.str();
}

void calc_and_output(int *c)
{
  float x = (float)(c[1]*c[5]-c[2]*c[4])/(c[1]*c[3]-c[0]*c[4]);
  float y = (float)(c[0]*c[5]-c[2]*c[3])/(c[0]*c[4]-c[1]*c[3]);

  cout << float_to_string(x, 3) << " " << float_to_string(y, 3) << endl;
}

int main(int argc, char const* argv[])
{
  int c[6];

  string line;
  while (getline(cin, line)) {
    istringstream iss(line);
    int val;
    int c[6];
    for (int i = 0; i < 6; i++) {
      iss >> val;
      c[i] = val;
    };

    calc_and_output(c);
  }

  return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <cctype>
#include <cstdio>
#include <math.h>
using namespace std;

int main() {
	
	double a,b,c,d,e,f,x,y;
	
	while(cin>>a>>b>>c>>d>>e>>f){
		printf("%.3f %.3f\n",floor((e*c-b*f)/(a*e-b*d)*1000+0.5)/1000,floor((a*f-c*d)/(a*e-b*d)*1000+0.5)/1000);		
	}
	
	return 0;
}

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

using namespace std;


int main(int argc, const char * argv[]) {
    // insert code here...
    
    int a,b,c,d,e,f;
    double x, y;
    
    cin >> a >> b >> c >> d >> e >> f;
    
    y = (f-c*(d/a)) / (e-b*(d/a));
    x = (c-b*y)/a;
    
    cout << setprecision(3) << x << endl;
    cout << setprecision(3) << y << endl;
    return 0;
}