Go: package main

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

var sc = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)

func main() {
	sc.Split(bufio.ScanWords)
	defer out.Flush()
	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 float64(((c * e) - (b * f)) / ((a * e) - (b * d)))
}

func GetY(a, b, c, d, e, f float64) float64 {
	return float64(((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 <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>

#define REP(i,m,n) for(int i=m;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)
#define rp(i,c) rep(i,(int)c.size())
#define fr(i,c) for(__typeof((c).begin()) i=(c).begin();i!=(c).end();i++)
#define mp make_pair
#define pb push_back
#define all(c) (c).begin(),(c).end()
#define rall(u) (u).rbegin(),(u).rend()
#define dbg(x) cerr<<#x<<" = "<<(x)<<endl
#define v_delete(a,b) (a).erase(remove((a).begin(), (a).end(), b), (a).end())
#define v_unique(a) (a).erase(unique((a).begin(), (a).end()), (a).end())
#define VV(T) vector<vector< T > >
#define init(a,b) memset((a), (b), sizeof((a)))
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pi;
const int inf=1<<28;
const double INF=1e10,EPS=1e-9;


template<class T>int SIZE(T a){return a.size();}
template<class T>string IntToString(T num){string res;stringstream ss;ss<<num;return ss.str();}
template<class T>T StringToInt(string str){T res=0;for(int i=0;i<SIZE(str);i++)res=(res*10+str[i]-'0');return res;}
template<class T>T gcd(T a,T b){if(b==0)return a;return gcd(b,a%b);}
template<class T>T lcm(T a,T b){return a/gcd(a,b)*b;}

template <class T> void input(T& a, int n) { for (int i = 0; i < n; ++i) cin >> a[i]; }
template <class T> void input(T* a, int n) { for (int i = 0; i < n; ++i) cin >> a[i]; }
typedef pair<int,int> pii;

inline bool IN(int x, int y, int w, int h)
{
    return 0 <= x && x < w && 0 <= y && y < h;
}


int main()
{
	int a,b,c,d,e,f;
	    float x,y,dx,dy;
	    while( cin >> a >> b >>c >>d >> e >> f ) {
	        x = (c*e-b*f)/(float)(a*e-b*d);
	        y = (c - a*x)/(float)b;


	        printf("%.3f %.3f\n",x+EPS,y+EPS);
	    }

	return 0;
}

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

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

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

	return 0;
}

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

int main(){
  for(double a1,b1,c1,d1,e1,f1,b2,c2,e2,f2,a3,c3,d3,f3,x,y;cin>>a1>>b1>>c1>>d1>>e1>>f1;){

    b2=b1*d1;
    c2=c1*d1;

    e2=a1*e1;
    f2=a1*f1;

    y=(c2-f2)/(b2-e2);

    a3=a1*e1;
    c3=c1*e1;

    d3=b1*d1;
    f3=b1*f1;

    x=(c3-f3)/(a3-d3);

    cout<<fixed<<setprecision(3)<<x;
    cout<<" ";
    cout<<fixed<<setprecision(3)<<y;
  }
  return 0;
}

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

int main(void)
{
	int a,b,c,d,e,f;
	float ans[2];

	cin >> a >> b >> c >> d >> e >> f;

	ans[1] = (c*d-a*f)/(b*d-a*e);
	ans[0] = (c*d-b*d*ans[1])/(a*d);

	printf("%.3f %.3f\n", ans[0],ans[1]);

	return 0;
}

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

int main(int argc, char **argv){
	//std::ifstream ifs("test.txt");
	double a = 0;
	double b = 0;
	double c = 0;
	double d = 0;
	double e = 0;
	double f = 0;

	while(std::cin >> a >> b >> c >> d >> e >> f){
	//while(ifs >> a >> b >> c >> d >> e >> f){
		double det = a * e - b * d;
		double x = (c * e - b * f) / det;
		double y = (a * f - c * d) / det;
		
		x = std::round(x * 1000) / 1000.0;
		y = std::round(y * 1000) / 1000.0;

		if(x == - 0){ x = 0; }
		if(y == - 0){ y = 0; }
		std::cout << std::fixed << std::setprecision(3) << x << " " << y << std::endl;
	}
	return 0;
}

C++: #include <iostream>
#include <stdlib.h>
#include <string.h>
#include <sstream>
#include <iostream>
#include <math.h>
#include <iomanip>

using namespace std;

string float_to_string(float f, int digits)
{
  ostringstream oss;
  oss << setprecision(digits) << setiosflags(ios::fixed) << f;
  return oss.str();
}

void calc_and_output(int *c)
{
  float x = (float)(c[1]*c[5]-c[2]*c[4])/(c[1]*c[3]-c[0]*c[4]);
  float y = (float)(c[0]*c[5]-c[2]*c[3])/(c[0]*c[4]-c[1]*c[3]);

  cout << float_to_string(x, 3) << " " << float_to_string(y, 3) << endl;
}

main(int argc, char const* argv[])
{
  int c[6];

  string line;
  while (getline(cin, line)) {
    istringstream iss(line);
    int val;
    int c[6];
    for (int i = 0; i < 6; i++) {
      iss >> val;
      c[i] = val;
    };

    calc_and_output(c);
  }

  return 0;
}

C++: #include <stdio.h>
#define EPS 1e-10
int main() {
    int a,b,c,d,e,f,x,sign,sign2;double q,r;while (scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)!=EOF) {
        x=a*e-b*d;if (x<0) sign=-1,x=-x; else sign=1;
        q=(c*e-f*b);if (q<0.00) sign2=-1,q=-q; else sign2=1;q=(q*sign*sign2)/(x+0.00);
        r=(a*f-c*d);if (r<0.00) sign2=-1,r=-r; else sign2=1;r=(r*sign*sign2)/(x+0.00);
        if (r<EPS && r>-EPS) r=0.00;if (q<EPS && q>-EPS) q=0.00;
        printf("%.3lf %.3lf\n",q,r);
    }
return 0;}

C++: #include <iostream>
#include <cstdio>
using namespace std;
double Round(double x);

int main(void){
    

    
    while(1){

        //??\?????????
        int a = 0;
        int b = 0;
        int c = 0;
        int d = 0;
        int e = 0;
        int f = 0;
        
        int ret = scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f);
        
        if(ret == EOF){
            break;
        }
        //?¨????
        double x = ( ( ( d * c ) - ( a * f ) ) / ( ( b * d ) - ( a * e ) ) );
        double y = ( ( ( b * d ) - ( a * c ) ) / ( ( d * c ) - ( a * f ) ) );    
        
        //?????¨?????\
        x = Round( x );
        y = Round( y );
        
        //??????
        printf("%.4f %.4f",x,y);
        
    }
    return(0);
}

double Round(double ReciveNum){
    
    double Section = (( ReciveNum * 1000 ) - (( int )( ReciveNum * 1000 )));
    
    if( Section < 0.0005){
        /* Do nothing */
    }else{
        ReciveNum += 0.001;
    }
    
    return ( ReciveNum );
}

C++: const int tt = 10000;

#include<iostream>
#include<string>
#include<sstream>
using namespace std;

string toStr(int n);
string intToString(int n);

int main() {
  int a, b, c, d, e, f;
  
  while(cin >> a >> b >> c >> d >> e >> f) {
    c = c * tt;
    f = f * tt;

    int det = a * e - b * d;

    int x = ( e * c - b * f) / det;
    int y = (-d * c + a * f) / det;
//    cout << x << y << endl;

    cout << toStr(x) << " " << toStr(y) << endl;
  }
}

string toStr(int n) {
  string pm, val;
  
  if (n < 0) {
    pm = "-";
    n = -n;
  } else {
    pm = "";
  }

  int ipart = n / tt;
  int fpart = (n - ipart * tt) + tt + 5;

  val = pm + intToString(ipart) + "." + intToString(fpart).substr(1, 3);
  return val;
}

string intToString(int n) {
  stringstream ss;
  ss << n;
  return ss.str();
}