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++: //#define _GRIBCXX_DEBUG
#include <algorithm>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iostream>
#include <iomanip>
#include <list>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;


// ?????¬???????????¬??????
#pragma region MACRO
#define P(x) cout << (x) << endl
#define p(x) cout << (x)
#define PED cout << "\n"
#define rep(i,n) for(int i=0; i<(int)n; ++i)
#define REP(i,x,n) for(int i=x; i<(int)n; ++i)
#define repi(i,n) for(int i=0; i<=(int)n; ++i)
#define REPI(i,x,n) for(int i=x; i<=(int)n; ++i)
#define ILP while(true)
#define FOR(i,c) for(__typeof((c).begin())!=(c).begin(); i!=(c).end(); ++i)
#define ALL(c) (c).begin(), (c).end()
#define mp make_pair
#pragma endregion

#pragma region TYPE_DEF
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<string, string> pss;
typedef pair<string, int> psi;
typedef pair<int, string> pis;
typedef vector<int> vi;
typedef vector<double> vd;
typedef vector<long> vl;
typedef vector<long long> vll;
typedef vector<string> vs;
#pragma endregion


// Effective std
#pragma region ESTD
template<typename C, typename T>
constexpr int count(C& c, T t) { return count(ALL(c), t); }
template<typename C, typename F>
constexpr int count_if(C& c, F f) { return count_if(ALL(c), f); }
template<typename C, typename T, typename U>
constexpr void replace(C& c, T t, U u) { replace(ALL(c), t, u); }
template<typename C, typename F, typename U>
constexpr void replace_if(C& c, F f, U u) { (ALL(c), f, u); }
template<typename C>
constexpr void sort(C& c) { sort(ALL(c)); }
template<typename C, typename Pred>
constexpr void sort(C& c, Pred p) { sort(ALL(c), p); }
template<typename C>
constexpr void reverse(C& c) { reverse(ALL(c)); }
#pragma endregion


// ?´???°
#pragma region PRIME
bool is_prime(unsigned n) {
  switch(n) {
    case 0:
    case 1: return false;
    case 2: return true;
  }
  if (n%2==0) return false;
  for (unsigned i=3; i*i<=n; i+=2)
    if (n%i==0) return false;
  return true;
}
#pragma endregion


// ??§??????/?°?????????????
#pragma region TRANSFORM
void mutal_tr(string &s) {
  for(int i=s.size(); i--;) {
    if(islower(s[i])) s[i] = toupper(s[i]);
    else if (isupper(s[i])) s[i] = tolower(s[i]);
  }
}
void to_upper(string &s) { for(int i=s.size(); i--;) s[i] = toupper(s[i]); }
void to_lower(string &s) { for(int i=s.size(); i--;) s[i] = tolower(s[i]); }
#pragma endregion


// ??????
#pragma region SET
template<class T>
set<T> intersection(const set<T>& sa, const set<T>& sb) {
  set<T> ret;
  for(T a : sa) if(sb.find(a) != sb.end()) ret.insert(a);
  return ret;
}
#pragma endregion

// Union Find
#pragma region UF
struct UnionFind {
  vector<int> data;
  UnionFind(int size) : data(size, -1) {}
  bool union_set(int x, int y) {
    x = root(x); y = root(y);
    if(x!=y) {
      if(data[y] < data[x]) swap(x, y);
      data[x] += data[y]; data[y] = x;
    }
    return x != y;
  }
  bool find_set(int x, int y) { return root(x) == root(y); }
  int root(int x) { return data[x] < 0 ? x : data[x] = root(data[x]); }
  int size(int x) { return -data[root(x)]; }
};
#pragma endregion


// ?????°
#pragma region CONST_VAL
#define PI (2*acos(0.0))
#define EPS (1e-9)
#define MOD (int)(1e9+7)
#pragma endregion

int main() {
    double a, b, c, d, e, f;
    while(cin>>a>>b>>c>>d>>e>>f) {
        /**
         * 1. ax + by = c
         * 2. dx + ey = f
         *
         * 1. x = (c - by)/a
         * 2. d(c-by)/a + ey = f
         * dc - bdy + aey = af
         * (ae-bd)y = af-dc
         * y = (af-dc)/(ae-bd)
         */
        printf("%.3lf %.3lf\n", (c-b*(a*f-d*c)/(a*e-b*d))/a, (a*f-d*c)/(a*e-b*d));

    }
  return 0;
}

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

int main(){
	float a,b,c,d,e,f,x,y,i,n;
	while(cin >> a >> 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;
		printf("%.3f %.3f\n",x ,y);
	}
	return 0;
}

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

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

    while (!cin.eof()){
        cin>>a>>b>>c>>d>>e>>f;
        double D=a*e-b*d;
        double X=(c*e-f*b)/D,Y=(a*f-d*c)/D;
        printf("%.3lf %.3lf\n",X,Y);

    }
    return 0;
}

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

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

using namespace std;

int main(int argc, char const* argv[])
{
	double a,b,c,d,e,f,x,y;

	while( 1 ){
		cin >> a >> b >> c >> d >> e >> f;
		double hoge = a * e - b * d;

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

		x *= 1000;
		if( x >= .5 ) x = int(x+.5-(x<0));
		else x = int(x);
		x /= 1000;

		y *= 1000;
		if( y >= .5) y = int(y+.5-(y<0));
		else y = int(y);
		y /= 1000;


		printf("%1.3f %1.3f\n", x, y );
	}

	return 0;

		
}

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

C++: #include <iostream>
#include <algorithm>
#include <set>
#include <vector>
#include <sstream>
#include <typeinfo>

using namespace std;

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

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

int main() {
	double a, b, c, d, e, f;
	while (cin >> a >> b >> c >> d >> e >> f) {
		double n, m;
		n = b * d - a * e;
		m = c * d - f * a;
		double y = m / n;

		double l = c - b * y;
		double x = l / a;

		cout << fixed << setprecision(3) << x << ' ' << y << endl;
	}
}

C++: #include<stdio.h>

int main(){
	
	double a,b,c,A,B,C,x,y;
	
	while(scanf("%lf",&a)!=EOF){
		
		scanf("%lf %lf %lf %lf %lf",&b,&c,&A,&B,&C);
		
		y=(c*A-C*a)/(b*A-B*a);
		x=(c*B-C*b)/(a*B-A*b);
		
		printf("%.3lf %.3lf\n",x,y);
		
	}
	
	return 0;
}

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

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

C++: #include<bits/stdc++.h>
typedef long long ll;
typedef unsigned long long ull;
using namespace std;
#define pb push_back
int dy[]={0, 0, 1, -1, 0};
int dx[]={1, -1, 0, 0, 0};
 
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)

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

    while(scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f) != EOF){
        double x = (c * e - b * f) / (double)(a * e - b * d);
        double y = (a * f - c * d) / (double)(a * e - b * d);

        if(-1e-3 < x && x < 1e-3)
            x = 0.0;
        if(-1e-3 < y && y < 1e-3)
            y = 0.0;
        printf("%0.3lf %0.3lf\n",x,y);
    }
    return 0;
}