Go: package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	for scanner.Scan() {
		strNums := strings.Fields(scanner.Text())
		nums := []int{}
		for _, strNum := range strNums {
			num, _ := strconv.Atoi(strNum)
			nums = append(nums, num)
		}
		a := nums[0]
		b := nums[1]
		c := nums[2]
		d := nums[3]
		e := nums[4]
		f := nums[5]
		var mulA, mulD int
		if a < 0 {
			mulA = a * -1
		} else {
			mulA = a
		}
		if d < 0 {
			mulD = d * -1
		} else {
			mulD = d
		}
		a *= mulD
		b *= mulD
		c *= mulD
		d *= mulA
		e *= mulA
		f *= mulA

		if d < 0 {
			d *= -1
			e *= -1
			f *= -1
		}

		bE := b - e
		cF := c - f
		if bE == 0 {
			bE = 1
		}
		y := cF / bE
		x := (c - (y * b)) / a

		fmt.Print(x)
		fmt.Println(".000")
		fmt.Print(y)
		fmt.Println(".000")
	}
}

C++: #include <algorithm>
#include <map>
#include <vector>
#include <iostream>
#include <sstream>
#include <cstdio>
#include <cstring>
#include <cctype>
#include <cstdlib>
#include <cmath>
#include <string>
#include <queue>
using namespace std;

#define REP(i,n) for(int i=0; i<n; ++i)
#define IREP(it,array) for(vector<int>::iterator it=array.begin(); it!=array.end(); ++it)
#define SREP(it,array) for(vector<string>::iterator it=array.begin(); it!=array.end(); ++it)
#define MP make_pair

double rou(double d){
  if( abs(d) < 0.0001)
    return 0.0;
  return d;
}

int main()
{
  cout.setf(ios::fixed, ios::floatfield);
  cout.precision(3);

  int INF = 1000000;

  int a,b,c,d,e,f;
  while(cin>>a>>b>>c>>d>>e>>f){
    cout << rou((double)(c*e-b*f)/(a*e-b*d)) << " "
	 << rou((double)(c*d-a*f)/(b*d-a*e)) << endl;
  }


  return 0;
}

C++: #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) {
    a = a * 10000;
    b = b * 10000;
    c = c * 10000;
    d = d * 10000;
    e = e * 10000;
    f = f * 10000;
    
    int x, y;
    int det = a * e - b * d;

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

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

string toStr(int n) {
  int ipart = n / 10000;
  int fpart = (n - ipart * 10000) + 5;
  return intToString(ipart) + "." + intToString(fpart).substr(0, 3);
}

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

C++: #include<iostream>
#include<iomanip>
#include<vector>
#include<map>
#include<string>
using namespace std;
/*
??£???????¨????
	ax + by = c
	dx + ey = f
????§£x, y???????????????????????°??????
*/
int main() {
	double a, b, c, d, e, f;
	int cnt = 0;						//??\??????????????£???????¨????????????°
	std::vector<double> x_vector;		//x????§£???????´?
	std::vector<double> y_vector;		//y????§£???????´?

#if 0
	while (cnt < 2) {
		cin >> a >> b >> c >> d >> e >> f;
#else
	while (cin >> a >> b >> c >> d >> e >> f) {
#endif
		double x = (b * f - c * e) / (b * d - a * e);
		double y = (c * d - a * f) / (b * d - a * e);

		cnt++;
		x_vector.push_back(x);
		y_vector.push_back(y);
	}

	for (unsigned int i = 0; i < cnt; i++) {
		int dummy_x = x_vector[i];		//?????£????????????????°???°?????\?????????
		int dummy_y = y_vector[i];		//?????£????????????????°???°?????\?????????

		//x?????????????°???°????¬¬4???????????¨?????\
		if (5 <= (x_vector[i] * 10000 - dummy_x * 10000)) {
			x_vector[i] += 0.001;
		}

		//y?????????????°???°????¬¬4???????????¨?????\
		if (5 <= (y_vector[i] * 10000 - dummy_y * 10000)) {
			y_vector[i] += 0.001;
		}

		std::cout << std::fixed;
		std::cout << std::setprecision(3) << x_vector[i] << " ";
		std::cout << std::setprecision(3) << y_vector[i] << endl;
		//???????????°
		//std::cout << std::setprecision(3) << x_vector[i] * 10000 << " ";
		//std::cout << std::setprecision(3) << y_vector[i] * 10000 << endl;
		//end???????????°
	}

	//???????????°
	//while (1);

	return 0;
}

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 - b * f) / (a * e - b * d);
    y = (double) (c * d - a * f) / (b * d - a * e);
    printf("%.3lf %.3lf\n", x, 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)
	{
		y=((d*c)-(a*f))/((b*d)-(a*e));
		x=(c-(b*y))/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() {
	// your code goes here

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

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

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


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

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

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

using namespace std;

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

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

int main(void)
{
	float a = 0;
	float b = 0;
	float c = 0;
	float d = 0;
	float e = 0;
	float f = 0;

	float x = 0;
	float y = 0;

	while (std::cin >> a >> b >> c >> d >> e >> f)
	{
		float tmp_a = a * e;
		float tmp_c = c * e;
		float tmp_d = d * b;
		float tmp_f = f * b;

		x = (tmp_c - tmp_f) / (tmp_a - tmp_d);

		float tmp_b = b * d;
		tmp_c = c * d;
		float tmp_e = e * a;
		tmp_f = f * a;

		y = (tmp_c - tmp_f) / (tmp_b - tmp_e);

		std::cout << std::fixed << std::setprecision(3) << x << " " << y << std::endl;
	}

	return 0;
}

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

using namespace std;

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

C++: #include <iostream>
#include <cstdio>
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)/(double)(a*e - b*d);
		y = (c*d - a*f)/(double)(b*d - a*e);

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

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

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

C++: #include <iostream>
#include <cstdio>
using namespace std;
#define j bai;
int main() {
	double a, b, c, d, e, y, x, f, bai;
	while (cin >> a >> b >> c >> d >> e >> f) {
		if (a < b) {
			bai = d / a;
			a *= j;
			b *= j;
			c *= j;
		}
		else {
			bai = a / b;
			d *= j;
			e *= j;
			f *= j;
		}
		if ((a > 0 && d < 0) || (a < 0 && d>0)) {
			y = (c + f) / (b + e);
			x = (c - b*y) / a;
		}
		else {
			y = (c - f) / (b - e);
			x = (c - b*y) / a;
		}
		printf("%.3lf %.3lf\n", x, y);
	}
	return 0;
}