Go: package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	var strs []string
	var a, b, c, d, e, f float64
	var x, y float64
	for scanner.Scan() {
		strs = strings.Split(scanner.Text(), " ")
		_a, _ := strconv.Atoi(strs[0])
		_b, _ := strconv.Atoi(strs[1])
		_c, _ := strconv.Atoi(strs[2])
		_d, _ := strconv.Atoi(strs[3])
		_e, _ := strconv.Atoi(strs[4])
		_f, _ := strconv.Atoi(strs[5])
		a = float64(_a)
		b = float64(_b)
		c = float64(_c)
		d = float64(_d)
		e = float64(_e)
		f = float64(_f)
		y = (c*d - f*a) / (d*b - a*e)
		x = (c - b*y) / a

		fmt.Printf("%.3f %.3f\n", x, y)
	}
}

C++: #include <iostream>
#include <cmath>
#include <algorithm>
#include <string>
#include <stdio.h>
using namespace std;
int main() {
    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=(a*f-c*d)/(a*e-b*d);
        printf("%.3f %.3f\n",x,y);
    }
}

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

using namespace std;

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

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


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

C++: #include <iostream>
#include <cstdio>
using namespace std;
int main(){
	float a,b,c,d,e,f,x,y;
	while(cin>>a>>b>>c>>d>>e>>f){
		y = (d*c - a*f)/(d*b - a*e);
		x = (f - e*y)/d;
	printf("%0.3f %0.3f \n",x+0.00000001,y+0.00000001);
	}
}

C++: #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){
        
        y=((d/a)*c-f)/((d/a)*b-e);
        x=((e/b)*c-f)/((e/b)*a-d);
        
        cout<<fixed<<setprecision(3)<<x<<" "<<y<<endl;
    }
}

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

int main(){
	
	double a,b,c,d,e,f ;
	double x,y ;
	
	while(1){
		cin >> a ;
		if( cin.eof() ) break ;
		cin >> b >> c ;
		cin >> d >> e >> f ;
		
		if( a*e - b*d == 0 ){
			cout << "error" << endl ;
		}
		else{
			x = ( c*e - b*f ) / ( a*e - b*d ) ;
			y = ( c*e - b*f ) / ( a*e - b*d ) ;
		}
		
		printf("%.3lf %.3lf\n",x ,y) ;
	}
	
return 0 ;
}

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

int main(void)
{
	double a,b,c,d,e,f;
	double ans[2];

	cin >> a >> b >> c >> d >> e >> f;

	ans[1] = (c*d-a*f)/(b*d-a*e);
	ans[0] = (c*d-b*d*ans[1])/(a*d);

	printf("%.3lf %.3lf\n", ans[0]+0.005,ans[1]+0.005);

	return 0;
}

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

using namespace std;

using DataSet = vector<double>;

//void debug(const string& prefix, const DataSet& data);

void readInputData(vector<string>& input_data){
    string buff;
    while(getline(cin, buff)){
        input_data.push_back(buff);
    }
    cout << input_data.size() << endl;
}

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;
    cout << setprecision(3);

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

        double det = determinant2d(data_set[i]);

        inverse2d(data_set[i]);
        //debug("inverse", data_set[i]);

        calculateXY(data_set[i], det, buff);
        //debug("calculate", data_set[i]);

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

//void debug(const string& prefix, const DataSet& data){
//
//
//    cout << prefix << endl;
//
//    cout << "Matrix:" << endl;
//    cout << data[0] << "  " << data[1] << endl;
//    cout << data[3] << "  " << data[4] << endl;
//
//    cout << "\nx_y:\n";
//    cout << data[2] << "\n" << data[5] << "\n";
//
//    cout << "\ndet: " << determinant2d(data) << endl;
//}



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

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

    solve(data_set);
}

//
//void test(){
//    vector<string> input_data;
//    input_data.push_back("1 2 3 4 5 6");
//    input_data.push_back("2 -1 -2 -1 -1 -5");
//    input_data.push_back("2 -1 -3 1 -1 -3");
//    input_data.push_back("2 -1 -3 -9 9 27");
//
//    vector<DataSet> data_set;
//    parseString(input_data, data_set);
//
//    solve(data_set);
//
//    getchar();
//}

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

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

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


double sisyagonyu(double num, int keta){

    if(keta < 1)return num;
    
    int i  = num * pow(10, keta);
    int sg = num * pow(10, keta + 1) - i * 10;
    
    
    if(sg >= 5)i++;
    else if(sg <= -5)i--;

    return i / pow(10.0, keta);
};

int main(){

    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 = (a * f - c * d) / (a * e - b * d);

        cout << setiosflags(ios::fixed) << setprecision(3);
        cout << sisyagonyu(x, 3) << ' ' << sisyagonyu(y, 3)  << endl;
     }
         
	return 0;
}

C++: #include <iostream>
 
using namespace std;
 
int main(int argc, char **argv)
{
    double a, b, c, d, e, f, tmp, s, t;
     
    while((cin >> a >> b >> c >> d >> e >> f)){
        tmp = (a*e-b*d);
        s = ((e*c-b*f)/tmp);
        t = ((a*f-d*c)/tmp);
         
        if(s == -0.0){
            s = 0.0;
        }
        if(t == -0.0){
            t = 0.0;
        }
        printf("%.3f %.3fn", s, t);
    }
     
    return 0;
}

C++: #include <cstdio>

int main (int argc, char *argv[]) {
	using namespace std;
	int a, b, c, d, e, f;
	while (EOF != fscanf(stdin, "%d %d %d %d %d %d\n", &a, &b, &c, &d, &e, &f)) {
		float tmp1 = static_cast<float>(f)-(static_cast<float>(c)*static_cast<float>(d)/static_cast<float>(a));
		float tmp2 = static_cast<float>(e)-(static_cast<float>(b)*static_cast<float>(d)/static_cast<float>(a));
		float y = tmp1/tmp2;
		float x = (c - b * y) / a;
		printf("%f %f\n", x, y);		
		//printf("y=%f\n", (f-(c*d/a))/(e-(b*d/a)));
	}
	
	return 0;
}