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 <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;
	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++: //Simulataneous Equation
#include<bits/stdc++.h>
using namespace std;

int main(){
  double a, b, c, d, e, f;
  while(scanf("%lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f)!=EOF){
    double x=(c*e-b*f)/(a*e-b*d), y=(c*d-a*f)/(b*d-a*e);
    if(x==0)x=0.0;
    if(y==0)y=0.0;
    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;
	double x, y, z;
	while (scanf("%lf", &a) != EOF && scanf("%lf", &b) != EOF && scanf("%lf", &c) != EOF && scanf("%lf", &d) != EOF && scanf("%lf", &e) != EOF && scanf("%lf", &f) != EOF) {
		x = d / a;
		y = b * x-e;
		z = c * x-f;
		z = z / y;
		y = (c - b*z) / a;
		printf("%.3f %.3f\n",y, z);
	}


}

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

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

    return 0;
}

C++: #include <stdio.h>
int main(){
	float a = 0,b = 0,c = 0,d = 0,e = 0,f = 0;
	float x = 0,y = 0;

	while(scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f) != EOF){
		if(a == 0){
			a *= e / b;
			c *= e / b;
			b *= e / b;

			if((c - f) == 0 || (a - d) == 0){
				y = 0;
			}
			else{
				y = (c - f) / (a - d);
			}
			
			if((f - e * y) == 0 || d == 0){
					x = 0;
			}
			else{
				x = (f - e * y) / d;
			}
		}
		else{
			b *= d / a;
			c *= d / a;
			a *= d / a;

			if((c - f) == 0 || (b - e) == 0){
				y = 0;
			}
			else{
				y = (c - f) / (b - e);
			}

			if((c - b * y) == 0 || a == 0){
					x = 0;
			}
			else{
				x = (c - b * y) / a;
			}
		}
		printf("%0.3f %0.3f\n",x,y);

	}

	return 0;
}

C++: #include <iostream>
#include <string>
#include <cctype>
#include <cmath>
#include <stdio.h>
#include <algorithm>
#include <vector>
#include <map> // pair
#include <set>
#define MAXSIZE 200000
#define PI 3.141592653589
using namespace std;

template<typename T>
T add(T a,T b){
  return a+b;
}

namespace A
{
  int f(void){
    return 1;
  }
}

int main(){
  int a,b,c,d,e,f;
  while (std::cin >> a>>b>>c>>d>>e>>f) {
    printf("%.3f %.3f\n",(1.0)*(b*f-c*e)/(b*d-a*e),(1.0)*(c*d-a*f)/(b*d-a*e));
  }

}

C++: #include<iostream>
#include<string>
#include<cmath>
#include<cstdio>
#include<vector>
#include<stack>
#include<queue>
#include<algorithm>
#include<complex>
using namespace std ;
typedef vector<int> vi ;
typedef vector<vi> vvi ;
typedef vector<string> vs ;
typedef pair<int, int> pii; 
typedef long long ll ;

#define loop(i,a,b) for(int i = a ; i < b ; i ++)
#define rep(i,a) loop(i,0,a)
#define all(a) (a).begin(),(a).end()
#define EPS 1e-9

int main(void){
  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);
  }
}