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>
#define EPS 1e-10
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 - f*b) / (a*e - d*b) + EPS;
    y = (double)(c*d - f*a) / (b*d - e*a) + EPS;

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

  return 0;
}

C++: #include<iostream>

using namespace std;

int main()
{
	int a, b, c, d, e, f;
	while(cin >> a >> b >> c >> d >> e >> f){
		double detA;
		double ansx, ansy;
		
		detA = (a*e)-(b*d);
		
		ansx = ((c*e)-(b*f))/detA;
		ansy = ((a*f)-(c*d))/detA;
		
		if(ansx == 0){
			ansx = 0;
		}
		if(ansy == 0){
			ansy = 0;
		}
		
		printf("%.3lf %.3lf\n",ansx,ansy);
	}
}

C++: #include <cstdio>
int main() {
 double a,b,c,d,e,f;
 while(scanf("%f %f %f %f %f %f",&a,&b,&c,&d,&e,&f)!=EOF){
  prinff("%f %f\n",(c * e - b * f) / (a * e - b * d),(a*f-d*c)/(a*e-b*d));
 };
 return 0;
};

C++: #include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <utility>
#include <functional>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <climits>
using namespace std;
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 vector<int> vi;
typedef vector<vi>  vvi;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef long long ll;
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define EACH(t,i,c) for(t::iretator i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define FOR(i,a,b) for(int i=(a);i<=(b);++i)
#define REP(i,n) FOR(i,0,n-1)
const double EPS = 1e-10;
const double PI = acos(-1.0);

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

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

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

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

	return 0;
}

C++: 
#include<stdio.h>
#include<math.h>
int main(void){
    double a,b,c,d,e,f,A,x,y,X,Y,Z;

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

    Y=b-e,Z=c-f;
    y=Z/Y;
    x=(c-y*b)/a;
    x=x+0.0005,y=y+0.0005;
    x=x*1000,y=y*1000;
    x=floor(x);
    y=floor(y);
    x=x/1000,y=y/1000;

   printf("%.3lf %.3lf\n",x,y);
    }
   // printf("\na%lf\nb%lf\nc%lf\nd%lf\ne%lf\nf%lf\n%lf\n%lf",a,b,c,d,e,f,Y,Z);


    }

C++: #include<iostream>
#include<iomanip>
#define x_Formula(a,b,c,d,e,f) (c-(b*f)/e)/(a-(b*d)/e);
#define y_Formula(x,a,b,c) (c-(a*x))/b;

using namespace std;

double x;
double y;

void serch()
{
	int xx,yy;
	xx=x*10000;
	yy=y*10000;
	if(xx%10>4)
		x+0.001;
	if(yy%10>4)
		y+0.001;
}
int main()
{
	double num[6];
	int i;
	
	for(;cin >> num[0];)
	{
		for(i=1;i<6;i++)
			cin >> num[i];
		
		x=x_Formula(num[0],num[1],num[2],num[3],num[4],num[5])
		y=y_Formula(x,num[0],num[1],num[2])
		
		cout << setprecision(3);
		cout << setiosflags(ios::scientific);
		cout << fixed ;
		serch();
		cout << x << " " << y << endl;
	}
}

C++: #include <iostream>
#include <cmath>
#include <iomanip>
#include <cstdlib>
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)/(a*e-b*d);
        double y = (-c*d+a*f)/(a*e-b*d);
        if(x==0) x=0;
        if(y==0) y=0;
        printf("%.3f %.3f\n",x,y);
    }
 
}

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

int main(){
	float a, b, c, d, e, f;
	float x, y;
	while(cin >> a >> b >> c >> d >> e >> f){
	x = (c*e - b*f) / (a*e - b*d);
	y = (a*f - c*d) / (a*e - b*d);
	x = floor(100 * (x + 0.005)) / 100;
	y = floor(100 * (y + 0.005)) / 100;
	cout << setprecision(3) << fixed << x << " " << y <<endl;
	}
	return 0;
}

C++: #include <iostream>
#include <stdio.h>
using namespace std;
 
int main(){
    double a,b,c,d,e,f,delta,kai,kait;
    while(1){
    if( scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f) == EOF) break;
    delta=a*d-b*c;
    kai=(d*e-b*f)/delta;
    kait=(a*f-e*c)/delta;
    printf("%.3f %.3f\n",kai,kait);
    }
 
    return 0;
}

C++: package task0004;

import java.util.Scanner;

public class Main {

	void run() {
		Scanner sc = new Scanner(System.in);

		while (sc.hasNext()) {
			double a = sc.nextInt();
			double b = sc.nextInt();
			double c = sc.nextInt();
			double d = sc.nextInt();
			double e = sc.nextInt();
			double f = sc.nextInt();

			// 連立方程式の解
			double x = (b * f - c * e) / (b * d - a * e);
			double y = (c * d - a * f) / (b * d - a * e);

			if (x == 0)
				x = 0;
			if (y == 0)
				y = 0;

			System.out.printf("%.3f %.3f\n", x, y);

			// BigDecimal ax = new BigDecimal(x);
			// BigDecimal ay = new BigDecimal(y);
			//
			// // 小数第4位を四捨五入
			// ax = ax.setScale(3, BigDecimal.ROUND_HALF_UP);
			// ay = ay.setScale(3, BigDecimal.ROUND_HALF_UP);
			//
			// System.out.println(ax + " " + ay);
		}

		sc.close();
	}

	void run1() {
		Scanner sc = new Scanner(System.in);

		double[] a = new double[6];

		while (sc.hasNext()) {
			for (int i = 0; i < 6; i++) {
				a[i] = sc.nextDouble();
			}

			double d = a[0] * a[4] - a[1] * a[3];
			double x = (a[4] * a[2] - a[1] * a[5]) / d;
			double y = (a[0] * a[5] - a[3] * a[2]) / d;

			if (x == 0)
				x = 0;
			if (y == 0)
				y = 0;

			System.out.printf("%.3f %.3f", x, y);
		}

		sc.close();
	}

	public static void main(String[] args) {
		new Main().run1();
	}

}

C++: /*http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0004&lang=jp*/

#include <iostream>

using namespace std;

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

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

using namespace std;

int main (int argc, char const* argv[])
{
    double a,b,c,d,e,f;
    double x,y;
    
    while(cin >> a >> b >> c >> d >> e >> f){
        x = (c*e - b*f) / (a*e - b*d);
        y = (c - a*x)/b;
        
        x = round(x * 1000)/1000.0;
        y = round(y * 1000)/1000.0;
        
        printf("%.03lf %.03lf\n",x,y);
    }
    
    return 0;
}

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

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

	while (cin >> a >> b >> c >> d >> e >> f) {
		double x = int(1000 * (e*c - b*f) / (a*e - b*d)) / 1000.0;
		double y = int(1000 * (c*d - a*f) / (b*d - a*e)) / 1000.0;

		cout << fixed;

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