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
		y := cF / bE
		x := (c - (y * b)) / a

		fmt.Printf("%d.000 ", x)
		fmt.Printf("%d.000\n", y)
	}
}

C++: #include<bits/stdc++.h>
using namespace std;

int main(){

  int a,b,c,d,e,f;
  double x,y;
  
  while(cin>>a>>b>>c>>d>>e>>f){

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

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

}

C++: #include<iostream>
#include<algorithm>
#include<stdio.h>
using namespace std;
int main(){
	long a,b,c,d,e,f;
	long o,p,q,r,s,t;
	double x,y;
	while(scanf("%ld%ld%ld%ld%ld%ld",&a,&b,&c,&d,&e,&f)!=EOF){
		o=a;p=b;q=c;r=d;s=e;t=f;
		o*=d;p*=d;q*=d;
		r*=a;s*=a;t*=a;
		//printf("%d %d %d %d %d %d \n",o,p,q,r,s,t);
		p-=s;
		q-=t;
		if(q==0){
			y=0.0;
		}
		else{
		y=(float)(q/p);
		}
		int g=(int)(e*y);
		g*=-1;
		if(f+g==0){
			x=0.0;
		}
		else{
			x=(float)((f+g)/d);
		}
		x+=0.0005;
		y+=0.0005;
		printf("%.3lf %.3lf\n",x,y);
	}
	return 0;
}

C++: //#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS
#include <cstdio>
//#include <cstdlib>
#include <cmath>
#include <iostream>
#include <algorithm>
//#include <cstring>
#include <vector>
#include <string>
#include <map>
#include <list>
#include <queue>
#include <set>
using namespace std;

int main(void){

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

	return 0;
}

/*
for(i=0;i<N;i++){
	cin >> X[i];
}


for(i=0;i<N;i++){
	for(j=0;j<N;j++){
		cin >> X[i][j];
	}
}
*/

C++: #include<iostream>
#include<cstdio>
#include<cctype>
#include<cstring>
#include<string>
#include<algorithm>
#include<queue>
#include<stack>
#include<iomanip>
using namespace std;

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

C++: #include<algorithm>
#include<functional>
#include<cmath>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<string>
#include<sstream>
#include<iostream>
#include<iomanip>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<map>
#include<set>
#include<bitset>

#define all(c) (c).begin(), (c).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define pb(e) push_back(e)
#define mp(a, b) make_pair(a, b)
#define fr first
#define sc second

typedef unsigned long long ull;
typedef long long ll;

const int INF=100000000;
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};

using namespace std;

typedef pair<int ,int > P;

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

int main()
{

	while(cin>>a>>b>>c>>d>>e>>f)
	{
		double x=(e*c-b*f)/(a*e-b*d);
		double y=(f*a-d*c)/(a*e-b*d);
		/*
		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<math.h>
#include<algorithm>
#include<string.h>
using namespace std;
int main(){
    double a,b,c,d,e,f,x,y;
    while(cin>>a>>b>>c>>d>>e>>f){
    x=(double)((e*c-f*b)/(a*e-b*d));
    y=(double)((-(d*c)+a*f)/(a*e-b*d));
    if(x==0){
        x=0;
    }
    if(y==0){
        y=0;
    }
    printf("%.3f %.3f\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", round(x * 1000)/1000, round(y*1000)/1000);
  }
  return 0;
}

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

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){
        if(b*d - a*e != 0){
         
         double tmp1 = (c*e - b*f),tmp2 = (a*e - b*d),tmp3 = (c*d - a*f),tmp4=(b*d - a*e);
        tmp1 = tmp1/tmp2;
        tmp2 = tmp3/tmp4;
        x = tmp1;
        y = tmp2;
	if(x < 0.0001 && x > -0.0001) x = 0;
	if(y < 0.0001 && y > -0.0001) y = 0;
         printf("%.3f %.3f",x,y);
        }
    }
    return 0;
}

C++: #include <iostream>
#include<string>
#include<cmath>
#include<algorithm>
#include<cctype>
#include<queue>
#include<stack>
#include<stdio.h>
#include<vector>
#include<set>
#include<map>
#include<iomanip>
#define rep(i,n) for(int i=0;i<n;i++)
typedef int long long ll;

using namespace std;
int main(){

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

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

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<ll, ll> P;

#define EACH(i,a) for (auto& i : a)
#define FOR(i,a,b) for (ll i=(a);i<(b);i++)
#define RFOR(i,a,b) for (ll i=(b)-1;i>=(a);i--)
#define REP(i,n) for (ll i=0;i<(n);i++)
#define RREP(i,n) for (ll i=(n)-1;i>=0;i--)
#define debug(x) cout<<#x<<": "<<x<<endl
#define pb push_back
#define ALL(a) (a).begin(),(a).end()

const ll linf = 1e18;
const int inf = 1e9;
const double eps = 1e-12;
const double pi = acos(-1);

template<typename T>
istream& operator>>(istream& is, vector<T>& vec) {
	EACH(x,vec) is >> x;
	return is;
}
template<typename T>
ostream& operator<<(ostream& os, vector<T>& vec) {
	REP(i,vec.size()) {
		if (i) os << " ";
		os << vec[i];
	}
	return os;
}
template<typename T>
ostream& operator<<(ostream& os, vector< vector<T> >& vec) {
	REP(i,vec.size()) {
		if (i) os << endl;
		os << vec[i];
	}
	return os;
}

int main() {
	std::ios::sync_with_stdio(false);
	std::cin.tie(0);
	int a, b, c, d, e, f;
	while ( cin >> a >> b >> c >> d >> e >> f ) {
		ll delta = a * e - b * d;
		ll x = c * e - b * f;
		ll y = a * f - c * d;
		cout << fixed << setprecision(3) << (ld)x/delta << " " << (ld)y/delta << endl;
	}
}

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