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 <bits/stdc++.h>
using namespace std;

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

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

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

	return 0;
}

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

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

	return 0;
}

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

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

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

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

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

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

C++: #include <iostream>
#include <cstdio>
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 = (f-d*x)/e;
		printf("%.3f %.3f\n", x, y);
	}
	return 0;
}

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

/*
 * Wrong Answer
 * 2015-06-26 02:00
 */

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

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

	return 0;
}

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

int main()
{
	int 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 << fixed
		     << setprecision(3)
		     << x<<y<<endl;
	}

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

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
#include <cassert>
#include <iomanip>
#include <cmath>

#define EPS (1e-6)

void solveSimultaneousEquation(double a, double b, double c, double d, double e, double f, 
                               std::pair<double, double>* pResult)
{
  assert(b * d - a * e != 0);
  std::pair<double, double>& result = *pResult;

  result.first = (b * f - c * e) / (b * d - a * e);
  result.second = (c * d - a * f) / (b * d - a * e);

  if (fabs(result.first) < EPS) {
    result.first = 0.0;
  }
  if (fabs(result.second) < EPS) {
    result.first = 0.0;
  }
}

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

  while (std::cin >> a >> b >> c >> d >> e >> f) {
    std::pair<double, double> result;
    solveSimultaneousEquation(a, b, c, d, e, f, &result);
    std::cout << std::fixed << std::setprecision(3) << result.first << " " << result.second << std::endl;
  }

  return 0;
}

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

using namespace std;

double solutionY();
double solutionX(double);
double a1,b1,c1,d1,e1,f1;

int main(){
  while(cin){
    cin >> a1 >> b1 >> c1 >> d1 >> e1 >> f1;//入力の最後まで処理って何だよ死ね！！
    double x,y;
    
    y = solutionY();
    x = solutionX(y);
    
    if(cin)cout << fixed << setprecision(3) << x << " " << y << endl ;
  }
  return 0;
}

double solutionY(){
  double b,c,e,f;
  b = b1/a1;
  c = c1/a1;

  e = e1/d1;
  f = f1/d1;
  
  return (c - f)/(b - e);
}

double solutionX(double y){
  double b,c;
  b = b1/a1;
  c = c1/a1;
  
  return (c - b*y);
}

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

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

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

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

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*a/b);
	double y = (c - a*x) / b;
	printf("%4.3f %4.3f\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 <math.h>

double RoundOff(double src, int keta);

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

double RoundOff(double src, int keta)
{
	// 10^keta 
	src *= pow(10.0, (double)(keta-1));
	if(src>0){
		// (int)(num+0.5) cast
		src = (int)(src+0.5);
	}
	else{
		// (int)(num-0.5)
		src = (int)(src-0.5);
	}
	// 10^-keta
	src /= pow(10.0, (double)(keta-1));
	
	return src;
}

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

	return 0;
}

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

void main(){
	int a,b,c,d,e,f;
	
	cout<<"ax+by=c"<<endl<<"dx+ef=f"<<endl;
	cout<<"		????§£???x,y??????????????????"<<endl;
	
	cout<<"a b c d e f >>>>";
	cin>>a>>b>>c>>d>>e>>f;
	
	cout<<"x="<<(e*c-b*f)/(a*e-b*d)
		<<"y="<<(-c*d+a*f)/(a*e-b*d)<<endl;
}