Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Split(bufio.ScanWords)
	for {
		data := nextInts(6)
		fmt.Printf("%.3f\n", Round(GetX(data[0], data[1], data[2], data[3], data[4], data[5]), 3))
		fmt.Printf("%.3f\n", Round(GetY(data[0], data[1], data[2], data[3], data[4], data[5]), 3))
	}
}

func GetX(a, b, c, d, e, f float64) float64 {
	return ((c * e) - (b * f)) / ((a * e) - (b * d))
}

func GetY(a, b, c, d, e, f float64) float64 {
	return ((c * d) - (a * f)) / ((b * d) - (a * e))
}

func Round(f float64, places int) float64 {
	shift := math.Pow(10, float64(places))
	return math.Floor(f*shift+.5) / shift
}

func next() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() float64 {
	a, _ := strconv.Atoi(next())
	return float64(a)
}

func nextInts(n int) []float64 {
	a := make([]float64, n)
	for i := 0; i < n; i++ {
		a[i] = nextInt()
	}
	return a
}

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

using namespace std;

typedef struct {
        double x1;
        double x2;
} answer;

answer solve_simultaneous_equations(double a, double b, double c, double d, double e, double f) {
        answer ans;
        ans.x1 = (c*e - b*f) / (a*e - b*d);
        ans.x2 = (c*d - a*f) / (b*d - a*e);
        return ans;
}

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

        while(cin >> a >> b >> c >> d >> e >> f) {
                answer ans;
                ans = solve_simultaneous_equations(a,b,c,d,e,f);
                cout << showpoint << fixed << setprecision(3) << ans.x1;
                cout << " ";
                cout << showpoint << fixed << setprecision(3) << ans.x2;
                cout << endl;
        }

        return 0;
}

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

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

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> veci;
typedef vector<ll> vecll;
typedef vector<string> vecs;
template<class T,class U> using Hash=unordered_map<T,U>;

#define REP(i, a, n) for(ll i = a; i < (ll)n; i++)
#define RREP(i, a, n) for(ll i = n-1; i >= (ll)a; i--)
#define rep(i, n) REP(i, 0, n)
#define rrep(i, n) RREP(i, 0, n)
#define MD 1000000007

template<class T> T read(){T a;cin >> a;return a;}
template<class T> void read(T& a){cin >> a;}
template<class T, class ...Args> void read(T& a, Args&... args){cin >> a; read(args...);} 
template<class T> void rarr(T a, int n){for(int i = 0; i < n; i++) {cin >> a[i];}}
template<char c = ' ',class T> void write(T a){cout << fixed << setprecision(4) << a << endl;}
template<char c = ' ',class T,class ...Args> void write(T a, Args... args){cout << fixed << setprecision(4) << a << c; write<c>(args...);}
template<class T> void warr(vector<T> a, const char* c = " "){cout << a[0];for(int i = 1; i < (int)a.size(); i++)cout << c << a[i];cout << endl;;}
template<class T> void warr(T a, int n, const char* c = " "){cout << a[0];for(int i = 1; i < n; i++)cout << c << a[i];cout << endl;}
void split(string s, string delim, veci& result){result.clear();string::size_type pos = 0;while(pos != string::npos){string::size_type p = s.find(delim, pos);if(p == string::npos){result.push_back(atoi(s.substr(pos).data()));break;}else {result.push_back(atoi(s.substr(pos, p - pos).data()));}pos = p + delim.size();}}
void split(string s, string delim, vecs& result){result.clear();string::size_type pos = 0;while(pos != string::npos){string::size_type p = s.find(delim, pos);if(p == string::npos){result.push_back(s.substr(pos));break;}else {result.push_back(s.substr(pos, p - pos));}pos = p + delim.size();}}
ll gcd(ll a, ll b){while(true){ll k = a % b;if(k == 0)return b;a = b;b = k;}}
ll comb(ll n, ll m){ll p=1;m=min(m,n-m);for(ll i=1;i<=m;i++){p*=n-i+1;p/=i;}return p;}

int main(void)
{
    while(!cin.eof()){
        double a[6];
        rep(i,6)cin>>a[i];
        double b[3];
        double p=a[0]/a[3];
        rep(i,3)b[i]=a[i]-a[i+3]*p;
        double resb=b[2]*1000/b[1];
        double resa=(a[2]-a[1]*resb/1000)*1000/a[0];
        resb=floor(resb)/1000.0;
        resa=floor(resa)/1000.0;
        write(resa,resb);
    }
    return 0;
}

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

C++: #include <iostream>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
#include <cmath>
using namespace std;
typedef vector<int> VI;
#define REP( i, m, n ) for ( int i = (int)( m ); i < (int)( n ); ++i )

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    
    vector<pair<double, double>> answers;

    double a, b, c, d, e, f;
    while (cin >> a >> b >> c >> d >> e >> f) {
        pair<double, double> ans;
        ans.first = (e * c - b * f) / (a * e - b * d) + 0.0;    // -0.000対策
        ans.second = (a * f - d * c) / (a * e - b * d) + 0.0;
        answers.push_back(ans);
    }

    for (auto ans : answers) {
        cout.setf(ios::fixed);
        cout.precision(3);
        cout << ans.first << " " << ans.second << endl;
    }
    
    return 0;
}

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

C++: #include<stdio.h>
#include<algorithm>
using namespace std;
int main(){
         double a,b,c,d,e,f,x,y;
		 while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)){
			y = (c*d-f*a)/(b*d-a*e);
			x = (c-b*y)/a;
			printf("%.3f %.3f\n",x ,y);
		 }
		 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){
        double x = (e*c - b*f) / (e*a - d*b);
        double y = (a*f - d*c) / (e*a - d*b);
        printf("%.3f %.3f\n",x,y);
    }

    return 0;
}

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

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

    while(cin >> a >> b >> c >> d >> e >> f){
        double de = (a*e) - (b*d);
        double x = 0;
        double y = 0;
        x = e*c + (-b)*f;
        x /= de;
        y = a*f + (-d)*c;
        y /= de;
        if(x == 0)
            x = 0.000;
        if(y == 0)
            y = 0.000;

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

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

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

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

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

C++: #include <stdio.h>

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