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 <cstdio>

using namespace std;

int main()
{
  long long a, b, c, d, e, f;
  while(scanf("%lld%lld%lld%lld%lld%lld", &a, &b, &c, &d, &e, &f) != EOF){
    long long g = e * a;
    long long h = f * a;
    long long i = b * d;
    long long j = c * d;
    long long k = i - g;
    long long l = j - h;
    double y = (double)l / (double)k;
    double x = (double)(c - b*y) / (double)a;

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

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

C++: const int tt = 10000;

#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) {
    c = c * tt;
    f = f * tt;

    int det = a * e - b * d;

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

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

string toStr(int n) {
  string pm, val;
  
  if (n < 0) {
    pm = "-";
    n = -n;
  } else {
    pm = "";
  }

  int ipart = n / tt;
  int fpart = (n - ipart * tt) + tt + 5;

  val = pm + intToString(ipart) + "." + intToString(fpart).substr(1, 3);
  return val;
}

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

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 - (double)e*c/b) / (d - (double)e*a/b);
	double y = (double)(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++: // http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0004&lang=jp
#include <algorithm>
#include <vector>
#include <iostream>
#include <math.h>
//#include <bits/stdc++.h>	//C++標準ライブラリ一括読み込み
using namespace std;

// ax+by=c
// dx+ey=f
double unko(double x){
	int y=int(round(x*1000));
	return double(y/1000);
}

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

C++: #include <iostream>
#include <queue>
#include <stack>
#include <vector>
#include <stdio.h>
#include <algorithm>
#include <string.h>
#include <string>
#include <cmath>
#include <complex>
#include <map>
using namespace std;

#define rep(i,n) for(int i=0;i<int(n);++i)
#define ALL(v) (v).begin(),(v).end()
#define PB push_back
#define EPS 1e-8
#define F first
#define S second

static const double PI=6*asin(0.5);
typedef long long ll;
typedef complex<double> CP;
typedef pair<int,int> P;
static const int INF=1<<24;

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

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

int main()
{
	double x[2],y[2],z[2];
	double X,Y;

	while(cin >> x[0] >> y[0] >> z[0] >> x[1] >> y[1] >> z[1]){
		y[0] *= x[1];	z[0] *= x[1];
		y[1] *= x[0];	z[1] *= x[0];

	
		Y = (z[0]-z[1]) / (y[0]-y[1]);

		y[0] /= x[1];
		z[0] /= x[1];
		z[0] -= y[0] * Y;

		X = z[0]/x[0];
	
		cout.precision(3);
		cout.setf(ios::fixed);

		cout << X << " "<< Y << endl;

	}
	return 0;
}

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

int rintv(double v) 
{
	return (v > 0) ? ((int)(v + 0.5)) : ((int)(v - 0.5)); 
}

double round_off(int dec_p, double value)
{
	double shift = pow(10, -dec_p);
	int intv = rintv(shift * value);
	return intv / shift;
}

int main()
{
	std::vector<double> x, y;
	double a, b, c, d, p, q;
	while (scanf("%d %d %d %d %d %d", &a, &b, &p, &c, &d, &q) != EOF)
	{
		x.push_back((d*p - b*q) / (a*d - b*c));
		y.push_back((a*q - c*p) / (a*d - b*c));
	}

	for (int i = 0; i < x.size(); ++i)
		std::cout << round_off(-4, x[i]) << " " << round_off(-4, y[i]) << std::endl;
	return 0;
}

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

double mround(double a){
	if(a<0)return a-0.0005;
	return a+0.0005;
}
int main(){
	double a[6];
	double x,y;
	while(cin>>a[0]>>a[1]>>a[2]>>a[3]>>a[4]>>a[5]){
		double b=a[1]/a[4];
		for(int i=0;i<3;i++)a[3+i]*=b;
		x=(a[2]-a[5])/(a[0]-a[3]);
		y=(a[2]-x*a[0])/a[1];

		mround(x);
		mround(y);
		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 = (c*e-b*f)/(a*e-b*d);
????????double y = (c-a*x)/b;
????????if(x == -0.0){
????????????x = 0.0;
????????}
????????if(y == 0.0){
????????????y = 0.0;
????????}
??
????????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;
	double copya, copyb, copyc;
	double odd;//倍率
	double x, y;

	while (cin >> a >> b >> c >> d >> e >> f)
	{
		copya = a, copyb = b, copyc = c;

		odd = a / d;

		d *= odd, e *= odd, f *= odd;

		a -= d, b -= e, c -= f;

		y = c / b;
		x = (copyc - copyb*y) / copya;

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

	}


	return 0;
}

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

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

using namespace std;

int main()
{
	int a[1000],b[1000],c[1000],d[1000],e[1000],f[1000];
	float x[1000],y[1000];
	int len=0;
	while (cin >> a[len] >> b[len] >> c[len] >> d[len] >> e[len] >> f[len])
		len++;

	for (int i=0; i < len; i++) {
		x[i] =  (double)((e[i] * c[i] - b[i] * f[i]) / (double)(e[i] * a[i] - b[i] * d[i]));
		y[i] =  ((c[i] * d[i] - f[i] * a[i]) / (b[i] * d[i] - a[i] * e[i]));
	}
	for (int i=0; i < len; i++) {
		printf("%.3lf %.3lf\n",x[i],y[i]);
	}
	return 0;
}