Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func read() string {
	sc.Scan()
	return sc.Text()
}

func main() {
	sc.Split(bufio.ScanLines)
	for sc.Scan() {
		s := strings.Split(sc.Text(), " ")
		a, _ := strconv.ParseFloat(s[0], 64)
		b, _ := strconv.ParseFloat(s[1], 64)
		c, _ := strconv.ParseFloat(s[2], 64)
		d, _ := strconv.ParseFloat(s[3], 64)
		e, _ := strconv.ParseFloat(s[4], 64)
		f, _ := strconv.ParseFloat(s[5], 64)
		x := ((b * f) - (c * e)) / ((b * d) - (a * e))
		y := ((a * f) - (c * d)) / ((a * e) - (b * d))
		if x == 0 {
			fmt.Printf("0.000 %.3f\n", y)
		} else if y == 0 {
			fmt.Printf("%.3f 0.000\n", x)
		} else {
			fmt.Printf("%.3f %.3f\n", x, y)
		}
	}
}

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

int main(){
	double a, b, c, d, e, f;
	double x, y;
	double A, B, C;
	const double p = 0.00000001;

	while (cin >> a >> b >> c >> d >> e >> f){
		A = (a*e) - (b*d);
		B = (c*e) - (b*f);
		C = (a*f) - (c*d);

		x = B / A;
		y = C / A;
		
		if (abs(x) < p) x = 0;
		if (abs(y) < p) y = 0;

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

C++: #include <iostream>
#include <iomanip>
using namespace std;
int main(){
    double a,b,c,d,e,f,x,y;
    cin>>a>>b>>c>>d>>e>>f;
    y=(c*d-f*a)/(b*d-e*a);
    x=(c*e-f*b)/(a*e-d*b);
    cout<<fixed<<setprecision(3)<<x<<" "<<y<<endl;
    
}

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

int main(void)
{
	// ax+by=c,dx+ey=f => ax+by=c,-(a/d)*dx+-(a/d)*ey=-(a/d)*f => ax+by=c,-ax-aey/d=-af/d => by-aey/d=c-af/d => (b-ae/d)y = c-af/d => y=(c-af/d)/(b-ae/d)
	// ax+by=c, ax=c-by, x=(c-by)/a
	
	signed int a, b, c, d, e, f;
	double x, y;
	
	do
	{
		if(std::cin >> a, !std::cin) break;
		std::cin >> b >> c >> d >> e >> f;
		y = (c-a*f/(double)d)/(b-a*e/(double)d);
		x = (c-b*y)/(double)a;
		printf("%.3lf %.3lf\n", x, y);
	} while(true);

	return 0;
}

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

using namespace std;

int main(void)
{
	double a, b, c, d, e, f, x, y;
	
	while(cin >> a >> b >> c >> d >> e >> f){
		y = (c*d - a*f) / (b*d - a*e);
		x = (c - b*y) / a;
		
		if(x == -0)
		x = 0;
		if(y == -0)
		y = 0;
		
		printf("%.3f %.3f\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)
		cout << fixed << setprecision(3) << (c * e - b * f) / (a * e - b * d) + 0.00001 << ' ' << (c * d - a * f) / (b * d - a * e) + 0.00001 << endl;
}

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

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

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

using namespace std;

int main() {

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

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

	return 0;

}

C++: #include <bits/stdc++.h>
using namespace std;
using uint = unsigned int;
using lint = long long int;
using ulint = unsigned long long int;
template<class T = int> using V = vector<T>;
template<class T = int> using VV = V< V<T> >;
template<class T, class U> void assign(V<T>& v, int n, const U& a) { v.assign(n, a); }
template<class T, class... Args> void assign(V<T>& v, int n, const Args&... args) { v.resize(n); for (auto&& e : v) assign(e, args...); }


V<string> split(const string& s, char c) {
  V<string> res;
  stringstream ss(s);
  string t;
  while (getline(ss, t, c)) res.push_back(t);
  return res;
}

int main() {
  cin.tie(nullptr); ios_base::sync_with_stdio(false);
  string s;
  while (getline(cin, s)) {
    auto ss = split(s, ' ');
    double a = stod(ss[0]);
    double b = stod(ss[1]);
    double c = stod(ss[2]);
    double d = stod(ss[3]);
    double e = stod(ss[4]);
    double f = stod(ss[5]);
    double x = (c * e - f * b) / (a * e - d * b);
    double y = (c * d - f * a) / (b * d - e * a);
    cout << fixed << setprecision(3) << x << ' ' << y << '\n';
  }
}

C++: #include<stdio.h>
#define N 1000000
struct{double a,b,c,d,e,f;}data[N];

int main(){
    int i,L;
    double a,b,c,d,e,f;
    double x,y;
    for(i=0; i<N&&scanf("%d %d %d %d %d %d",data[i].a,data[i].b,data[i].c,data[i].d,data[i].e,data[i].f)!=EOF; i++);
    L=i;
    for(i=0;i<L;i++){
        a=data[i].a; b=data[i].b; c=data[i].c; d=data[i].d; e=data[i].e; f=data[i].f;
        x=(1/(a*e-b*d))*(e*c-b*f);
        y=(1/(a*e-b*d))*(a*f-d*c);
        printf("%.3f %.3f",x,y);
    }
    return 0;
}

C++: #include<stdio.h>

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

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

using namespace std;

void inputData(vector<string>& data_set) {
	string buffer;
	while(getline(std::cin,buffer))
		data_set.push_back(buffer);
}

vector<string> splitString(const string& str, const string& separator = " ") {
	vector<string> ret;

	std::size_t bp, ep;
	bp = ep = 0;
	while((ep = str.find_first_of(separator, bp)) != string::npos){
		if(bp != ep){
			ret.push_back(string(str.begin() + bp, str.begin() + ep));
		}
		bp = ep + 1;
	}

	if(bp <= str.size() - 1){
		ret.push_back(string(str.begin() + bp, str.end()));
	}

	return ret;
}

template <class T>
T convertStringToNumber(const string& str) {
	stringstream ss;
	T ret;

	ss << str;
	ss >> ret;

	return ret;
}



vector<double> parseStringData(const string& data_str) {
	auto buff = splitString(data_str);

	vector<double> ret(buff.size());
	for(int i = 0; i < buff.size(); ++i){
		auto temp = convertStringToNumber<double>(buff[i]);
		ret[i] = temp;
	}

	return ret;
}


void displayAnswer(const vector<double>& data_set) {
	double det = 1.0 / (data_set[0] * data_set[4] - data_set[1] * data_set[3]); 
	double x = det * (data_set[4] * data_set[2] + -data_set[1] * data_set[5]);
	double y = det * (-data_set[3] * data_set[2] + data_set[0] * data_set[5]);

	auto func = [](double n) -> double {
		int buff = static_cast<int>(round(n * 1000));
		if(!abs(buff))
			return abs(buff);
		return buff / 1000.0;
	};

	x = func(x);
	y = func(y);

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


void doAllProcess() {
	vector<string> buffer;
	inputData(buffer);

	for(int i = 0; i < buffer.size(); ++i){
		auto data_set = parseStringData(buffer[i]);
		displayAnswer(data_set);
	}
}


int main() {
	doAllProcess();

	return 0;
}

C++: #include <iostream>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
#include <cmath>
using namespace std;
typedef vector<int> VI;
#define REP( i, m, n ) for ( int i = (int)( m ); i < (int)( n ); ++i )

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    
    vector<vector<double>> equations;

    double a, b, c, d, e, f;
    while (cin >> a >> b >> c >> d >> e >> f) {
        vector<double> tmp = {a, b, c, d, e, f};
        equations.push_back(tmp);
    }

    for (auto t : equations) {
        double x, y;
        t[4] = t[4] / t[3] * t[0] - t[1];
        t[5] = t[5] / t[3] * t[0] - t[2];
        t[1] /= t[0];
        t[2] /= t[0];

        y = t[5] / t[4];
        x = t[2] - t[1] * y;
        
        cout.setf(ios::fixed);
        cout.precision(3);
        cout << x << " " << y << endl;
    }
    
    return 0;
}