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 <cstdio>
#include <cmath>
using namespace std;

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

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

		if(abs(x)<0.005){
			x = 0.0;
		}
		if(abs(y)<0.005){
			y = 0.0;
		}


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

	return 0;
}

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

int main() {
  for(double a, b, c, d, e, f; scanf("%lf%lf%lf%lf%lf%lf", &a, &b, &c, &d, &e, &f) != EOF; ) {
    double det = a * e - b * d;
    double x = (e * c - b * f) / det;
    double y = (-d * c + a * f) / det;
    printf("%.3f %.3f\n", x + 1e-8, y + 1e-8);
  }
}

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

using namespace std;

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

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

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

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

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

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

		std::cout << std::fixed << std::setprecision( 3 ) << x << " " << y << std::endl;
	}

	return 0;
}

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

int main(void){
	double x1,y1;
	int a=0,b=0,c=0,d=0,e=0,f=0,x2,y2;
    
    while(scanf("%d %d %d %d %d %d\n",&a,&b,&c,&d,&e,&f) != EOF)
	{
	    x2 = (c * e -b * f) / (a * e - b * d)*1000+0.5;
	    y2 = (a * f -d * c) / (a * e - b * d)*1000+0.5;

		x1 = x2/1000;
		y1 = y2/1000;
		printf("%lf %lf\n",x1,y1);
	}
  return 0;
}

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

int main(){
  int 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 = (f-d*x) / e;

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

  }


  return 0;
}

C++: #include<iostream>
#include<iomanip>
#include<cstdio>
#include<vector>
#include<algorithm>
#include<cmath>
#include<queue>
#include<stack>
#include<functional>
#include<string>
#include<cstring>
#include <sstream>
using namespace std;
int main(void){
    double a,b,c,d,e,f,x,y;
    while(cin >> a >> b >> c >> d >> e >> f){
        double ad = a / d;
        d *= ad;
        e *= ad;
        f *= ad;
        d -= a;
        e -= b;
        f -= c;
        y = f/e;
        x = (c - b * y)/a;
        y *= 1000;
        y = round(y);
        y /= 1000;
        x *= 1000;
        x = round(x);
        x /= 1000;
        cout << fixed << std::setprecision(3) << x << " " << fixed << std::setprecision(3) << y << endl;
    }
    return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <sstream>

using namespace std;

using DataSet = vector<double>;


void readInputData(vector<string>& input_data){
    string buff;
    while(cin >> buff){
        input_data.push_back(buff);
    }
}

void _parseString(const string& input_data, DataSet& data_set) {
    data_set.resize(6);

    stringstream ss;
    ss << input_data;
    ss >> data_set[0] >> data_set[1] >> data_set[2]
        >> data_set[3] >> data_set[4] >> data_set[5];
}

void parseString(const vector<string>& input_data, vector<DataSet>& data_set) {
    data_set.resize(input_data.size());
    for(int i = 0; i < input_data.size(); ++i) {
        DataSet buff;
        _parseString(input_data[i], buff);
        data_set[i] = buff;
    }
}

double determinant2d(const DataSet& data){
    return data[0] * data[4] - data[1] * data[3];
}

void inverse2d(DataSet& data){
    double t = data[0];
    data[0] = data[4];
    data[4] = t;

    data[1] = -data[1];
    data[3] = -data[3];
}


void calculateXY(const DataSet& data, double det, vector<double>& result){
    result.resize(2);

    result[0] = (data[0] * data[2] + data[1] * data[5]) / det;
    result[1] = (data[3] * data[2] + data[4] * data[5]) / det;
}

void solve(vector<DataSet>& data_set){
    cout << fixed << setprecision(3);

    for(int i = 0; i < data_set.size(); ++i){
        vector<double> buff;

        double det = determinant2d(data_set[i]);

        inverse2d(data_set[i]);

        calculateXY(data_set[i], det, buff);

        cout << buff[0] << " " << buff[1] << endl;
    }
}


void doAllProcess(){
    vector<string> input_data;
    readInputData(input_data);

    vector<DataSet> data_set;
    parseString(input_data, data_set);

    solve(data_set);
}



int main(){
    doAllProcess();
    return 0;
}

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

using namespace std;

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

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

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

	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(abs(x)<0.0001) x=0.0000;
		if(abs(y)<0.0001) y=0.0000;
		cout<<fixed<<setprecision(3)
		    <<x<<" "<<y<<endl;
	}
}

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

 int main() {

	 double a;
	 double b;
	 double c;
	 double d;
	 double e;
	 double f;
	 double x;
	 double y;

	 while (std::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);

		
		 std::cout << std::fixed;
		 std::cout << std::setprecision(3) << x << " " << std::setprecision(3) << y << std::endl;
	 }



}

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(4);
	  cout <<(e*c - b*f) / (a*e - b*d) << " " << (a*f - d*c) / (a*e - b*d) << endl;
	}
cout<<endl;
    return 0;
}

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

int main() {
  int 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 = (a * f - c * d) / (a * e - b * d);
    printf("%.3f %.3f\n", x, y);

  }
}