Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func read() string {
	sc.Scan()
	return sc.Text()
}

func main() {
	sc.Split(bufio.ScanLines)
	for sc.Scan() {
		s := strings.Split(sc.Text(), " ")
		a, _ := strconv.ParseFloat(s[0], 64)
		b, _ := strconv.ParseFloat(s[1], 64)
		c, _ := strconv.ParseFloat(s[2], 64)
		d, _ := strconv.ParseFloat(s[3], 64)
		e, _ := strconv.ParseFloat(s[4], 64)
		f, _ := strconv.ParseFloat(s[5], 64)
		x := ((b * f) - (c * e)) / ((b * d) - (a * e))
		y := ((a * f) - (c * d)) / ((a * e) - (b * d))
		if x == 0 {
			fmt.Printf("0.000 %.3f\n", y)
		} else if y == 0 {
			fmt.Printf("%.3f 0.000\n", x)
		} else {
			fmt.Printf("%.3f %.3f\n", x, y)
		}
	}
}

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

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

C++: #include<stdio.h>
int main(void)
{
	int b,a,e,d,f,i,c;
	float y,x;
	while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)!=EOF)  {
			y=(c*d-a*f)/(b*d-a*e);
			x=(c-(b*y))/a;
		if(x<0.0000 && x>-0.0001){
			x=0;
		}
		if(y<0.000&&y>-0.0001){
			y=0;
		}	
		printf("%.3f %.3f\n",x,y);
	}
	return 0;
}

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

int main(){
 double x,y;
 double a,b,c,d,e,f;
 while(!cin.eof()){
   cin >> a >> b >> c >> d >> e >> f ;

   x = (b*f-e*c)/(b*d-a*e);
   y = (c-a*x)/b;
   
   printf("%.3f %.3f\n",x,y);

 }
}

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

C++: #include<iostream>
#include<iomanip>
using namespace std;
int main(void){
    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=(a*f-c*d)/(a*e-b*d);
        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>
#include <stdio.h>
using namespace std;

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

C++: #include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<set>
#include<string>
#include<functional>
#include<queue>
#include<math.h>
#define INF 999999

using namespace std;


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

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

		double x = (e*c - b*f) / (e*a - b*d);
		double y = (d*c - a*f) / (d*b - a*e);
		if (x == 0)x = 0;
		if (y == 0)y = 0;
		
		printf("%.3f %.3f\n", x,y);
	}

	return 0;
}

C++: #include <iostream>
using namespace std;
int main() {
  int a, b, c, d, e, f;
  while (cin >> a >> b >> c >> d >> e >> f) {
    printf("%.3f %.3f, (a * f - c * d) / (a * e - b * d), (b * f - c * e) / (b * d - a * e));
  }
  return 0;
}

C++: #include <iostream>
#include <stdio.h>
using namespace std;
int main(){
	double a, b, c, d, e, f;
	double x, y;
	double g, h, i;

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

		g = a * d;
		h = g / a;
		i = g / d;

		y = (h * c - i * f) / (h * b - i * e);

		x = ((h * c) - (h * b * y)) / (h * a);

		if(x == -0){
			x = -0 * (-1);
		}
		else if(y == -0){
			y = -0 * (-1);
		}

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

	}



}

C++: #include<iostream>

using namespace std;

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

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

using namespace std;

int main(void) {
	while(1) {
		int a, b, c, d, e, f;
		double x, y;
		cin >> a >> b >> c >> d >> e >> f;
		if(cin.eof()) break;

		x = (double)(e * c - b * f) / (a * e - b * d);
		y = (double)(a * f - d * c) / (a * e - b * d);
		if(x == 0) { x = 0; }
		if(y == 0) { y = 0; }

		cout << fixed << setprecision(3) << x << " " << y << endl;
	}
	return 0;
}

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

using namespace std;

int main() {
	char s[1000];
	while (1) {
		string str;
		if ( !getline(cin, str) ) break;

		for (int i = 0; i < str.size(); ++i)
			s[i] = str[i];
		s[str.size()] = '\0';

		double a, b, c, d, e, f;
		sscanf(s, "%lf%lf%lf%lf%lf%lf", &a, &b, &c, &d, &e, &f);

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

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

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

using namespace std;

pair<double, double> solve(int a, int b, int c, int d, int e, int f){
  pair<double, double> ans;
  ans.first = (double)(f * b - c * e) / (double)(b * d - a * e);
  ans.second = (double)(c * d - a * f) / (double)(b * d - a * e);

  return ans;
}

int main(){
  int a, b, c, d, e, f;
  vector< pair<double, double> > ans;

  while(cin >> a &&
	cin >> b &&
	cin >> c &&
	cin >> d &&
	cin >> e &&
	cin >> f){
    ans.push_back(solve(a, b, c, d, e, f));
  }

  for(int i = 0; i < ans.size(); i++){
    printf("%.3f %.3f\n", ans[i].first, ans[i].second);
  }
  
  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>y && y> -0.00049) 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;
    double x, y;
    while (cin>>a>>b>>c>>d>>e>>f) {
        x = (e*c - b*f) / (a*e - b*d);
        y = (-d*c + a*f) / (a*e - b*d);
        cout << fixed << setprecision(3) << x << " " << y << endl;
    }
}

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

int main(){
double a,b,c,d,e,f,a_,b_,c_,d_,e_,f_;
double x,y;
double in;
while (std::cin >>a>>b>>c>>d>>e>>f){
in = (a*e - b*d);
a_ = a/in;
b_ = -1*d/in;
d = -1*b/in;
e_ = e/in;
x = c * a_ + f*b_;
y = c*d_ + f*e_;
std::cout << std::setprecision(3) << std::fixed << x << ' ' << std::setprecision(3) << std::fixed <<  y << std::endl;
}
    return 0;
}

C++: #include <iostream>
#include <stdio.h>
using namespace std;
  
int main(void){
    double a,b,c,d,e,f,delta,kai,kait;
    while(1){
	    if( scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f) == EOF) break;
		delta=a*d-b*c;
		kai=(d*e-b*f)/(delta);
		kait=(a*f-e*c)/(delta);
		printf("%.3f %.3f\n",kai,kait);
    }
    return 0;
}

C++: #include<iostream>

using namespace std;
   
void Simultaneous()
{
    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 - c * d ) / ( a * e - b * d );
        
        cout.setf(ios::fixed); //"setf" is used for “half-adjusting”
        cout.precision(3); //precision is used for rould off three places of decimals
        
        //if value is 0, and there is half-adjusting function below, then the output would be "-0", needs to change it to "0"
        if(x == 0)
        {
            x = 0;
        }
        
        if(y == 0)
        {
            y = 0;
        }
        
        cout<<x<<" "<<y<<endl;
    }
            
    return;
}
     
int main()
{     
    Simultaneous();
    return 0;
}