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++: #define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

int main(void) {
	char string[54];
	double a, b, c, d, e, f, x, y;
	scanf("%s",string);
	
	a = atof(strtok(string, " "));
	b = atof(strtok(NULL, " "));
	c = atof(strtok(NULL, " "));
	d = atof(strtok(NULL, " "));
	e = atof(strtok(NULL, " "));
	f = atof(strtok(NULL, " "));

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

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

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

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

  while(cin >> a >> b >> c >> d >> e >> f){
  

    y = (c*d - f*a)/(b*d-e*a);
    x = (b*y - c)/a;
    
    
    x*=1000;
    y*=1000;
    
    // x+=0.5;
    //y+=0.5;
    
    x/=1000;
    y/=1000;
    
    //cout << x << y << endl;
    printf("%.3f %.3f\n", x, y);
  }

  return 0;
}

C++: #include <iostream>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <iomanip>
#include <cassert>
using namespace std;

#define GET_ARG(a,b,c,F,...) F
#define REP3(i,s,e) for (i = s; i <= e; i++)
#define REP2(i,n) REP3 (i,0,(int)(n)-1)
#define REP(...) GET_ARG (__VA_ARGS__,REP3,REP2) (__VA_ARGS__)
#define RREP3(i,s,e) for (i = s; i >= e; i--)
#define RREP2(i,n) RREP3 (i,(int)(n)-1,0)
#define RREP(...) GET_ARG (__VA_ARGS__,RREP3,RREP2) (__VA_ARGS__)
#define DEBUG(x) cerr << #x ": " << x << endl

int main(void) {
    int a, b, c, d, e, f;
    while (cin >> a >> b >> c >> d >> e >> f) {
        double det = a * e - b * d;
        int x = e * c - b * f;
        int y = a * f - d * c;
        cout << fixed << setprecision(5);
        if (x == 0) cout << 0 << " ";
        else cout << x / det << " ";
        cout << fixed << setprecision(5);
        if (y == 0) cout << 0 << endl;
        else cout << y / det << endl;
    }
    return 0;
}

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

using namespace std;

int main() {
#ifdef ISMDEEP_LOCAL
    freopen("../in.txt", "r", stdin);
#endif
    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);
        double y = (a * f - c * d) / (a * e - b * d);
        if (x == 0) x = 0.00;
        if (y == 0) y = 0.00;
        printf("%.3lf %.3lf\n", x, y);
    }
    return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<math.h>

float s(float a) {
	a *= 1000;
	if (a > 0) {
		a += 0.5;
	}
	else {
		a -= 0.5;
	}
	int b = a;
	a = b;
	a /= 1000;
	return a;
}

int main() {
	float a, b, c, d, e, f;
	while (~scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f)) {
		b *= d;
		c *= d;
		e *= a;
		f *= a;
		float x, y;
		if (a != 0) {
			y = (c - f) / (b - e);
			x = (c / d - b / d * y) / a;
		}
		else {
			y = c / b;
			x = (f - e * y) / d;
		}
		printf("%.3f %.3f\n", s(x), s(y));
	}
}

C++: #include <iostream>
int main(){
	for(float a,b,c,d,e,f;;printf("%0.3f %0.3f\n",
		(f/d-e*(c*d-a*f)/(b*d-a*e)/d),
		(c*d-a*f)/(b*d-a*e))){
		std::cin>>a>>b>>c>>d>>e>>f;
		if(std::cin.eof())break;
	}
}

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

	cout << fixed << setprecision(3) << ((c*e-b*f)/(a*e-b*d))  << " " << ((a*f-c*d)/(a*e-b*d)) << endl;
	
	}

	return 0;

C++: #include <stdio.h>

int main(){
  int a, b, c, d, e, f;
  scanf("%d",&a);
  scanf("%d",&b);
  scanf("%d",&c);
  scanf("%d",&d);
  scanf("%d",&e);
  scanf("%d",&f);
  
  double x, y;
  x = (double)(c*e-b*f) / (double)(a*e-b*d);
  y = (double)(a*f-c*d) / (double)(a*e-b*d);
???x = (double)round(x*10000.0) / 10000.0;
  y = (double)round(y*10000.0) / 10000.0;
  printf("%f.3 %f.3\n", x, y);
  
  return 0;
}

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

using namespace std;

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

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

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

	return 0;
}

C++: #include <stdio.h>

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

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 Xa = c * e - b * f;
        double Xb = a * e - b * d;
        double Ya = c * d - a * f;
        double Yb = b * d - a * e;
        printf("%.3lf %.3lf\n", Xa / Xb + 1e-9, Ya / Yb + 1e-9);

    }
}

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

int main(void)
{
  std::cin.tie(0);
  std::ios::sync_with_stdio(false);

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

C++: #include<iostream>
#include<sstream>
#include<string>
#include<algorithm>
#include<cmath>
#include<cstdio>
#include<map>
#include<vector>
#include<queue>
#include<set>
#include<numeric>

using namespace std ;

#define pb(n) push_back(n)
#define fi first
#define se second
#define np string::npos
#define all(r) (r).begin(),(r).end()
#define gsort(st,en) sort((st),(en),greater<int>())
#define vmax(ary) *max_element(all(ary))
#define vmin(ary) *min_element(all(ary))
#define debug(x) cout<<#x<<": "<<x<<endl

#define rep(i,n) for(int i = 0; i < (int)(n);++i)
#define repc(i,a,b) for(int i = (a);i < (int)(b);++i)
#define repi(it,array) for(auto it = array.begin(),end = array.end(); it != end;++it)
#define repa(n,array) for(auto n :(array))

typedef long long ll ;
typedef vector<int> vi ;
typedef vector<ll> vl ;
typedef map<string,int> dict;

constexpr int imax = ((1<<30)-1)*2+1 ;
constexpr int inf = 100000000;
double eps = 1e-10 ;

template <typename T>
void out(vector < T > v)
{
  for(size_t i = 0; i < v.size(); i++)
  {
    debug(v[i]);
  }
}

template<typename T>
string ntos( T i ) {
  ostringstream s ;
  s << i ;
  return s.str() ;
}

template<typename T>
T ston(string str, T n){
  istringstream sin(str) ;
  T num ;
  sin >> num ;
  return num ;
}

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  double a,b,c,d,e,f,x,y;
  while(cin >> a >> b >> c >> d >> e >> f){
    x = (b*f-e*c)/(b*d-e*a) * 1000 ;
    if(x > 0){
      x += 0.5 ;
    }
    else if(x < 0){
      x -= 0.5 ;
    }
    x = ((int)(x))/1000.0 ;
    y = (c*d-a*f)/(b*d-e*a) * 1000 ;
    if(y > 0){
      y += 0.5 ;
    }
    else if(y < 0){
      y -= 0.5 ;
    }
    y =((int)(y))/1000.0 ;
    cout << x << " " << y << endl;
  }
  return 0;
}