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 <iostream>
#include <string>
#include <cstring>
#include <fstream>
#include <algorithm>
#include <iomanip>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <map>
#include <list>
#include <set>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <bitset>
#include <functional>

using namespace std;

#define FOR(i,n) 		for(int(i)=0;(i)<(int)(n);(i)++)
#define FORN(i,a,b,c) 	for(int(i)=a;i<(int)(b);i+=(c))
#define RES(x,nilai)	memset(x,nilai,sizeof(x));
#define pb              push_back
#define mp              make_pair
#define INF				1000000000

typedef long long ll;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;

inline string IS(int a){
    char x[100];
    sprintf(x,"%d",a); string s = x;
    return s;
}

inline int SI(string a){
    char x[100]; int res;
    strcpy(x,a.c_str()); sscanf(x,"%d",&res);
    return res;
}

//==============================================

bool cmp(int x,int y) {return x>y;}

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

int main() {
	//freopen("in.txt","r",stdin);
	//freopen("13.txt","w",stdout);
	ios_base::sync_with_stdio(false); cin.tie(NULL);
	
	
    while(cin>>a>>b>>c>>d>>e>>f) {
        y = (a*f-c*d)/(a*e-d*b);
        x = (c-b*y)/a;
		cout << fixed << setprecision(3) << x << ' ' << y << endl;
    }
	
    return 0;
}

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

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

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

int main()
{
	double A, B, C, D, E, F, X, Y, G , H;

	while(cin >> A >> B >> C >> D >> E >> F)
	{
		G = A / D;
		D *= G;
		E *= G;
		F *= G;
		Y = (F-C) / (E-B);
		
		D /= G;
		E /= G;
		F /= G;
		H = B / E;
		D *= H;
		E *= H;
		F *= H;
		X = (F-C) / (D-A);

		X= floor(X*1000+0.5)/1000;
		Y= floor(Y*1000+0.5)/1000;

		if(Y==0){
			Y=0.000;
		}

		if(X==0){
			X=0.000;
		}

		cout<<fixed<<setprecision(3)<<X<<" "<<Y<<endl;
	}

	return 0;
}

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

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);
		y=(c-a*f/d)/(b-a*e/d);
		if(x>=0){
			int q=x*1000+0.5;
			x=q;
			x/=1000;
		}
		if(x<0){
			int q=x*1000-0.5;
			x=q;
			x/=1000;
		}
		if(y>=0){
			int q=y*1000+0.5;
			y=q;
			y/=1000;
		}
		if(y<0){
			int q=y*1000-0.5;
			y=q;
			y/=1000;
		}
		cout<<fixed<<setprecision(3)<<x<<" ";
		cout<<fixed<<setprecision(3)<<y<<endl;
	}
	return 0;
}

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

using namespace std;
using ll = long long;
using pii = pair<int, int>;

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(3);
  
  auto det = [&](double a, double b, double c, double d) { return a * d - b * c; };
  double a, b, c, d, e, f;
  while (cin >> a >> b >> c >> d >> e >> f) {
    double x = det(c, b, f, e) / det(a, b, d, e);
    double y = det(a, c, d, f) / det(a, b, d, e);
    if (fabs(x) < 1e-10) x = 0;
    if (fabs(y) < 1e-10) y = 0;
    cout << x << " " << y << endl;
  }

  return 0;
}

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

#define MAX 256

int main(void){

	float a, b, c, d, e, f;
	float ansx[MAX], ansy[MAX];

	int i = 0;

	while (scanf("%f%f%f%f%f%f%f", &a,&b,&c,&d,&e,&f) != EOF){
		if (a*e != b*d){
			ansx[i] = (c*e - b*f) / (a*e - b*d);
			ansy[i] = (c*d - a*f) / (b*d - a*e);
			if ((int)(ansx[i] * 10000) % 10 > 4){
				ansx[i] += 0.001;
			}
		}
		i++;
	}

	for (int j = 0; j < i; j++){
		printf("%.3f %.3f\n", ansx[j], ansy[j]);
	}
	
	return 0;
}

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



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

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;
}

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

int main(){
	int a, b, c, d, e, f;
	while(cin>>a>>b>>c>>d>>e>>f){
		double x, y;
		y = 1.0*(d*c-a*f)/(d*b-a*e);
		x = 1.0*(e*c-b*f)/(e*a-b*d);
		if(fabs(x)<0.0005) x = 0.0;
		if(fabs(y)<0.0005) y = 0.0;
		printf("%.3f %.3f\n", x, y);
	}
	return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <set>
#include <map>
#include <list>
#include <iterator>
#include <queue>
#include <stack>
#include <deque>
#include <sstream>
#include <algorithm>
#include <numeric>
#include <string>
#include <cmath>
#include <complex>
#include <functional>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cassert>
#include <cstdlib>
#include <cctype>

using namespace std;
int main()
{
	int a,b,c,d,e,f;
	while(cin >> a >> b >> c >> d >> e >> f){
		if(a<c){
			swap(a,d);
			swap(b,e);
			swap(c,f);
		}
		double x=(c-((a/d)*f))/(b-((a/d)*e));
		double y=(c-x*b)/a;
		cout << fixed << setprecision(3) << y  << " " << x<< endl;
	}

	return 0;
}

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

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

using namespace std;

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

	while(cin >> a, cin >> b, cin >> c, cin >> d, cin >> e, cin >> f){
		x = (e * c - b * f) / (a * e - b * d);
		y = (-d * c + a * f)/ (a * e - b * d);

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

C++: 
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <vector>
#include <string>
#include <queue>
#include <algorithm>
#include <math.h>
#include <utility>
#include <set>
#include <map>
#define INF 100000
using namespace std;

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