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.Print(".000 ")
		fmt.Print(y)
		fmt.Println(".000")
	}
}

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

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

		cout << x << " " << y << "\n";
	}

}

C++: #include <bits/stdc++.h>

using namespace std;

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);
		cout << fixed << setprecision(3) << (x) << " " << round(y) << endl;
	}
}

C++: #include<iostream>
#include<sstream>
#include<string>
#include<algorithm>
#include<cmath>
#include<cstdio>
#include<map>
#include<vector>
#include<queue>
#include<set>
#include<numeric>

using namespace std ;

#define pb(n) push_back(n)
#define fi first
#define se second
#define np string::npos
#define all(r) (r).begin(),(r).end()
#define gsort(st,en) sort((st),(en),greater<int>())
#define vmax(ary) *max_element(all(ary))
#define vmin(ary) *min_element(all(ary))
#define debug(x) cout<<#x<<": "<<x<<endl

#define rep(i,n) for(int i = 0; i < (int)(n);++i)
#define repc(i,a,b) for(int i = (a);i < (int)(b);++i)
#define repi(it,array) for(auto it = array.begin(),end = array.end(); it != end;++it)
#define repa(n,array) for(auto n :(array))

typedef long long ll ;
typedef vector<int> vi ;
typedef vector<ll> vl ;
typedef map<string,int> dict;

constexpr int imax = ((1<<30)-1)*2+1 ;
constexpr int inf = 100000000;
double eps = 1e-10 ;

template <typename T>
void out(vector < T > v)
{
  for(size_t i = 0; i < v.size(); i++)
  {
    debug(v[i]);
  }
}

template<typename T>
string ntos( T i ) {
  ostringstream s ;
  s << i ;
  return s.str() ;
}

template<typename T>
T ston(string str, T n){
  istringstream sin(str) ;
  T num ;
  sin >> num ;
  return num ;
}

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  double a,b,c,d,e,f,x,y;
  while(cin >> a >> b >> c >> d >> e >> f){
    x = (b*f-e*c)/(b*d-e*a) * 1000 ;
    if(x >= 0){
      x += 0.5 ;
    }
    else{
      x -= 0.5 ;
    }
    x = ((int)(x))/1000 ;
    y = (c*d-a*f)/(b*d-e*a) * 1000 ;
    if(y >= 0){
      y += 0.5 ;
    }
    else{
      y -= 0.5 ;
    }
    y =((int)(y))/1000 ;
    cout << x << " " << y << endl;
  }
  return 0;
}

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

int main(){
	float x, y;
	int a, b, c, d, e, f;
	string p, q;
	while (true){
		cin >> a >> b >> c >> d >> e >> f;
		if (cin.eof()){
			break;
		}
		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{
			x = (c*e - b*f) / (e*a - b*d);
			y = (c - a*x) / b;
		}
		cout << x << " " << y << endl;
	}
	return 0;
}

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

int main(){
	
	double a, b, c, d, e, f, x=0, y=0; // ???????°???°?????°??? %f
	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,y);
	
}

C++: #include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <queue>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <complex>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <fstream>
#include <stdio.h>

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<double> VEC;
typedef vector<VEC> MAT;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef pair<int, PII> TIII;
typedef long long LL;
typedef vector<LL> VLL;
typedef vector<VLL> VVLL;
//container util

//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define MT(a,b,c) MP(a, MP(b, c))
#define T1 first
#define T2 second.first
#define T3 second.second.first
#define T4 second.second.second

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define EPS 1.0e-9

int main(){
	while(!cin.eof()){
		double a,b,c,d,e,f;
		cin>>a>>b>>c>>d>>e>>f;
		double x = (c*e-b*f)/(a*e-b*d);
		double y = (a*f-c*d)/(a*e-b*d);
		char sx[100], sy[100];
		sprintf(sx, "%.3f", x);
		sprintf(sy, "%.3f", y);
		if(!strcmp(sx, "-0.000"))sprintf(sx, "0.000");
		if(!strcmp(sy, "-0.000"))sprintf(sy, "0.000");
		printf("%s %s\n",sx,sy);
	}
	return 0;
}

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

int main()
{
    double a,b,c,d,e,f,t,u,v;
    vector<double> x(0),y(0);
    while (cin>>a>>b>>c>>d>>e>>f)
    {
        x.push_back(0);
        y.push_back(0);
        t=a; u=b; v=c;
        a*=d;  b*=d; c*=d;
        d*=t; e*=t; f*=t;
        y[y.size()-1]=(c-f)/(b-e);
        x[x.size()-1]=(v-u*y[y.size()-1])/t;
    }
    for (int i=0; i<x.size(); i++)
    {
        printf("%.3f %.3f\n", x[i], y[i]);
        //cout<<x[i]<<".000 "<<y[i]<<".000\n";
    }
    return 0;
}

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

int main()
{
    double a,b,c,d,e,f;
    while(cin>>a>>b>>c>>d>>e>>f) {
		//A*x=y
		//x=A^-1*y

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

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

#define rep(i, n) for(int i = 0; i < n; ++i)

using namespace std;

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

double normalize(double x){
	if(-0.001 < x && x < 0.001){
		return 0;
	}
	return x;
}

int main(){
	while(scanf("%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f) != EOF){
		double det = a * e - b * d;
		double x = (e * c - b * f) / det;
		double y = (-d * c + a * f) / det;
		printf("%.3f %.3f\n", normalize(x), normalize(y));
	}
	return 0;
}

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

using namespace std;

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

	while(cin >> a >> b >> c >> d >> e >> f){
			delta = (a * e) - (b * d);

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

			if(x % 10000 >= 5){
				x += 0.001;
			}if(y % 10000 >= 5){
				y += 0.001;
			}

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

	return 0;
}