Go: package main

import "fmt"

func main() {

	for {
		var a, b, c, d, e, f float64
		var x, y float64
		i, _ := fmt.Scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f)
		if i != 6 {
			return
		}

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

		fmt.Printf("%.3f %.3f\n", x, y)
	}
}

C++: #include <stdio.h>
#include <vector>
#include <utility>
#include <algorithm>
#include <iostream>
#include <limits>
#include <iomanip>
using namespace std;
#define rep(i,n) for(int i=0;i<n;++i)
#define ld long double
ld a, b, c, d, e, f, x, y;
ld shish(ld a)
{
	if (a == 0) { return a; }
	
	a *= 1000;
	if (a > 0) {
		a += 0.51;
	}
	else {
		a -= 0.51;
	}
	a = (ld)((int)a);
	a /= 1000;
	return a;
}
int main() {
	while (cin >> a >> b >> c >> d >> e >> f) {
		y = (a*f - c*d) / (ld)(a*e - b*d);
		x = (c*e - f*b) / (ld)(a*e - b*d);

		x = shish(x);
		y = shish(y);
		if (x == 0) { cout << "0.000"; }
		else {
			cout << fixed << setprecision(10) << x;
		}
		cout << " ";
		if (y == 0) { cout << "0.000" << endl; }
		else{
			cout << fixed << setprecision(10) << y << endl;
		}
	}
	return 0;
}

C++: #include <cstdio>

using namespace std;

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-f*a) / (b*d-e*a);
    	if (isnan(y)) y=0; 
    	x = (c-b*y) / a;
    	if (isnan(x)) x=0;
    	
    	printf("%.3f %.3f\n", x, y);
    }
}

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

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

using namespace std;

int main(void){
	double arr[6];
	vector<double> x,y;

	while (cin >> arr[0] >> arr[1] >> arr[2] >> arr[3] >> arr[4] >> arr[5]){
		double a = arr[0]; double b = arr[1]; double c = arr[2]; double d = arr[3]; double e = arr[4]; double f = arr[5];
		x.push_back((c*e-b*f)/(a*e-b*d));
		y.push_back((c*d-a*f)/(b*d-a*e));
	}
	for (unsigned int i=0; i<x.size(); ++i){
		printf("%.3lf %.3lf\n", round(x[i]), round(y[i]));
	}
	return 0;
}

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 <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <fstream>
#include <stdio.h>
#include <complex>

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<string> VS;
typedef pair<int, int> PII;
typedef pair<int, PII> TIII;
typedef long long LL;
typedef vector<LL> VLL;

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

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

int main(){
	double a,b,c,d,e,f;
	while(!cin.eof()){
		cin>>a>>b>>c>>d>>e>>f;
		cout << (c*e-b*f)/(a*e-b*d) << " " << (c*d-a*f)/(b*d-a*e) << endl;
	}
	return 0;
}

C++: #include <cstdio>

using namespace std;

int main()
{
    //freopen("input.txt", "r", stdin);
    int a, b, c, d, e, f;
    while(scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f)==6){
        double x, y;
        x = ((b*f)-(c*e))/((b*d)-(a*e));
        y = (c-(a*x))/b;

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

    return 0;
}

C++: #include <cstdio>

using namespace std;

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

	while (scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF) {
	    _b = b * d;
	    _c = c * d;
	    _e = e * a;
	    _f = f * a;
	    
	    y = (_c - _f) / (_b - _e);
	    x = (c - b * y) / a;
	    
	    printf("%.3f %.3f\n", x, y);
	}
	
	return 0;
}

C++: #include <stdio.h>

int main(void){
	int a,b,c,d,e,f;
	float x,y;
	while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)!=EOF){
		x=(c*e-b*f)/(a*e-d*b);
		y=(d*c-a*f)/(d*b-a*e);
		x=(2*x+(1/1000))/2;
		y=(2*y+(1/1000))/2;
		printf("%0.3f %0.3f\n",x,y);
	}
}

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

    return 0;
}

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

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

	while (1) {
		cin>>a>>b>>c>>d>>e>>f;
		if (cin.eof()) break;

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

		cout<<setprecision(4)<<setiosflags(ios::fixed)<<x<<" "<<y<<endl;
	}

	return 0;
}

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

auto main () -> int
{
    static const char * zeros [] = {"00" , "00" , "0" , ""};
    double a , b , c , d , e , f;
    while (std::cin >> a >> b >> c >> d >> e >> f)
    {
        auto delta = a * e - b * d;
        auto x = (e * c - b * f) / delta;
        auto y = (- c * d + a * f) / delta;
        auto x_ = std::lround (x * 1000);
        auto y_ = std::lround (y * 1000);
        auto x_high = x_ / 1000;
        auto x_low = std::abs (x_) % 1000;
        auto y_high = y_ / 1000;
        auto y_low = std::abs (y_) % 1000;
        std::cout << x_high << '.' << x_low << zeros [x_low ? static_cast <int> (std::log10 (x_low)) + 1 : 0] << ' '
                  << y_high << '.' << y_low << zeros [y_low ? static_cast <int> (std::log10 (y_low)) + 1 : 0] << std::endl;
    }
}

C++: #include <iostream>

using namespace std;

/*
aX+bY=c
dX+eY=f
*/

void solve(int a, int b, int c, int d, int e, int f) {
	int x = (f - e*c/b) / (d - e*c/b);
	int y = (c - a*x) / b;
	cout << x << " " << y << endl;
}

int main() {
	int a, b, c, d, e, f;
	while (cin >> a >> b >> c >> d >> e >> f) {
		solve(a,b,c,d,e,f);
	}
	return 0;
}

C++: #include<iostream>
#include<cmath>
#include<cstdio>
using namespace std;
int main(){
  double a,b,c,d,e,f;

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

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

#define REP(i, a) for(int i=0;i<(int)a;++i)
using namespace std;

void solver() {
    double a, b, c, d, e, f;
    while (cin >> a >> b >> c >> d >> e >> f) {
        auto y = (c * d - f * a) / (b * d - a * e);
        auto x = (c * e - f * b) / (a * e - b * d);
        cout << fixed;
        cout << setprecision(3);
        cout << x << " " << y << endl;
    }
}

int main() {
    solver();
    return 0;
}