Go: package main

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

func gcd(num1, num2 int) int {
	if num2 == 0 {
		return num1
	}
	num3 := num1 % num2
	return gcd(num2, num3)
}

func lcm(num1, num2 int) int {
	if num1%num2 != 0 {
		num3 := gcd(num1, num2)
		for i := 1; ; i++ {
			check := num3 * i
			if check%num1 == 0 && check%num2 == 0 {
				return check
			}
		}
	} else {
		return num1
	}
}

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]
		lcm := lcm(a, d)
		mulA := lcm / a
		mulD := lcm / d
		a *= mulA
		b *= mulA
		c *= mulA
		d *= mulD
		e *= mulD
		f *= mulD

		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.Printf("%d.000 ", x)
			fmt.Printf("%d.000\n", y)
	}
}

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

void OutputSolution(int a, int b, int c, int d, int e, int f)
{
	double y = (a*f - c*d) / (a*e - b*d);
	double x = (c-b*y) / a;
	if(x == -0) x = 0;
	if(y == -0) y = 0;
	cout << fixed << setprecision(3) << x << ' ' << y << endl;
}

int main()
{
	while(true){
		int a, b, c, d, e, f;
		cin >> a >> b >> c >> d >> e >> f;
		if(cin.eof()) break;
		OutputSolution(a, b, c, d, e, f);
	}
	return 0;
}

C++: //include
//------------------------------------------
#include <bits/stdc++.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();}

//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef unsigned long long ULL;

//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())

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

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);

//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))

//debug
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

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

C++: #include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#define shosu(x) fixed<<setprecision(x)
using namespace std;
int main(){
	cout<<shosu(3);
	double a,b,c,d,e,f;
	while(cin>>a>>b>>c>>d>>e>>f){
		double tmp=a*e-b*d;
		cout<<(c*e-b*f)/tmp<<' '<<(a*f-c*d)/tmp<<endl;
	}
}

C++: #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define MOD 1000000007 //10^9+7
#define INF 1000000000 //10^9

pair<double, double>equ2(int a,int b,int c,int d,int e,int f){
    double det=1.0/(a*e-b*d);
    double x=(double)(c*e-b*f)*det;
    double y=(double)(a*f-c*d)*det;
    if (x==-0) x=0;if (y==-0) y=0;
    return pair<double, double>(x,y);
}

int main ()
{
    string str;
    while (!cin.eof()) {
        int a,b,c,d,e,f;
        
        cin>>a>>b>>c>>d>>e>>f;
        
        pair<double,double> ans=equ2(a,b,c,d,e,f);
        
        printf("%.3f %.3f\n",ans.first+0.0005,ans.second+0.0005);
    }
    return 0;
}

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

    return 0;
}

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

int main(){
  double a, b, c, d, e, f;
  while(cin >> a >> b >> c >> d >> e >>f){
    if(-1000 <= a && a<=1000 &&-1000 <= b && b<=1000 &&-1000 <= c && c<=1000 &&-1000 <= d && d<=1000 &&-1000 <= e && e<=1000 &&-1000 <= f && f<=1000){
  double x, y;
  x = ((b*f)/e -c)/((b*d)/e-a);
  y = ((a*f)/d -c)/((a*e)/d-b);
  if(y == 0)y = 0;
  if(x == 0)x = 0;
  cout << fixed << setprecision(3) << x << " " << y << endl;
    }else break;
}
  return 0;
}

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

void func(double, int);

int main(){

	double a, b, c, d, e, f, x, y, del;
	
	while(cin >> a){
	
		cin >> b >> c >> d >> e >> f;
		
		del = a * e - b * d;
		x = (c * e - b * f) / del;
		y = (a * f - c * d) / del;
		
		func(x, -4);
		func(y, -4);
		cout << fixed;
	  cout.precision(3);
	  cout << x << " " << y << endl;
	}

	return 0;
}

void func(double x, int n){
	
	x *= pow(10, -n-1);
	round(x);
	x *= pow(10, n+1);	

}

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=(e*c-b*f)/(a*e-b*d);
		y=(c*d-a*f)/(b*d-a*e);

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

//大文字を小文字に変換
/*
for(int i=0;i<inp.size();i++)
if(inp[i]>='A' && inp[i]<='Z')
inp[i]+='a'-'A';
*/

C++: #include <stdio.h>
int main(){
	double a,b,c,d,e,f;
	double x,y;
	while((scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f))!=EOF){
		y=(c*d-a*f)/(b*d-a*e);
		x=(c-b*y)/a;
		printf("%0.3lf %0.3lf\n",x,y);
	}
	return 0;
}

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

C++: #include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
int main() {
    double a, b, c, d, e, f;
    while(cin >> a) {
        cin >> b >> c >> d >> e >> f;
        double x = (c * e - b * f) / (a * e - b * d);
        double y = (-c * d + a * f) / (a * e - b * d);
        if (abs(x) < 1e-3) x = 0.0;
        if (abs(y) < 1e-3) y = 0.0;
        cout << fixed << setprecision(3) << x << " " << y << endl;
    }
    return 0;
}

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

using namespace std;

int main(){
	cout << setprecision(3) << setiosflags(ios::fixed);
	double a, b, c, d, e, f;

	while(cin >> a >> b >> c >> d >> e >> f){
		cout << (c*e-f*b)/(a*e-d*b) + 0.000001<< " " << (c*d-f*a)/(b*d-a*e) + 0.000001 << '\n';
		}
	return 0;
}