Go: package main

import "fmt"

func main() {
	var resultX, resultY [100]float32
	var count int
	for {
		var a, b, c, d, e, f, x, y float32
		fmt.Scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f)
		if a == 0 {
			break
		}
		//Simultaneous equation
		y = (((a * f) - (d * c)) / ((a * e) - (b * d)))
		x = ((c - (b * y)) / a)
		resultX[count] = x
		resultY[count] = y
		count++
	}
	for i := 0; i < count; i++ {
		fmt.Printf("%.3f %.3f\n", resultX[i], resultY[i])
	}
}

C++: #include <iostream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <deque>
#include <list>
#include <string>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>

using namespace std;

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

int main() {
	a = -10000;
	cin >> a >> b >> c >> d >> e >> f;

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

		if (x > -0.001 && x <= 0) x = 0;
		if (y > -0.001 && y <= 0) y = 0;

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

		a = -10000;
		cin >> a >> b >> c >> d >> e >> f;
	}

	return 0;
}

/*@@@@@@@@@@@@@@@@@@@@@@@@@*/
/*@                       @*/
/*@ debug output erased ? @*/
/*@                       @*/
/*@@@@@@@@@@@@@@@@@@@@@@@@@*/

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

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

	while(scanf("%d %d %d %d %d %d", &a,&b,&c,&d,&e,&f) != EOF){
		x = (e*c - b*f)/(a*e - b*d);
		y = (f/e) - (d/e)*x;

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

	return 0;
}

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

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

C++: #include <iostream>
#include <iomanip>
#include <cmath>
int main(void)
{
    double a,b,c,d,e,f;
    double x,y;
    std::cout << std::showpoint << std::setprecision(4);
    while(std::cin >> a >> b >> c >> d >> e >> f){
        x = (c * e - b * f) / (a * e - b * d) * 1000;
        x = (x >= 0.0 ? std::floor(x + 0.5) : std::ceil(x - 0.5)) / 1000;;
        y = (f * a - c * d) / (a * e - b * d) * 1000;
        y = (y >= 0.0 ? std::floor(y + 0.5) : std::ceil(y - 0.5)) / 1000;
        std::cout << x << " " << y << std::endl;
    }
    return 0;
}

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

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

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

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

    return 0;
}

C++: z = []
while True:
	try:
		a, b, c, d, e, f = map(float, raw_input().split())
		x = (c * e - b * f) / (a * e - d * b)
		y = (c * d - f * a) / (b * d - e * a)
		z.append([x, y])
	
	except:
		break
for i in z:
	print("{:.3f} {:.3f}".format(i[0] + 0, i[1] + 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);
    }
}

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 <iostream>
#include <iomanip>
using namespace std;

void SolveAndShowEquation(double a,double b,double c,double d,double e,double f);
double Roundoff(double x);
int main(){
  double a,b,c,d,e,f;
  while(cin>>a>>b>>c>>d>>e>>f){
    SolveAndShowEquation(a,b,c,d,e,f);
  }
  return 0;
}

void SolveAndShowEquation(double a,double b,double c,double d,double e,double f){
  double x,y,delta;
  delta=a*e-b*d;
  x=(c*e-b*f)/delta;
  y=(a*f-c*d)/delta;
  x=Roundoff(x);
  y=Roundoff(y);
  cout<<fixed<<setprecision(3)<<x<<" "<<setprecision(3)<<y<<endl;
}

double Roundoff(double x){
  if( x<0 ){
    x*=-1;
    x=double(int(x*1000))/1000+((((x*1000)-int(x*1000))*10)>=5?0.001:0);
    x*=-1;
  }else{
    x=double(int(x*1000))/1000+((((x*1000)-int(x*1000))*10)>=5?0.001:0);
  }
  return x;
}

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

C++: #include <iostream>
#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 = (double)(c*e-b*f) / (a*e-b*d);
    y = (double)(f-d*x) / e;

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

  }


  return 0;
}

C++: #include<stdio.h>

int main(void){
  double a,b,c,d,e,f;
  double x,y;
  while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f) != EOF){
    if(a*e == b*d){
      printf("This equiation has no real number solution");
      break;
    }
    x = (e * c + (-1)*b*f)/(a*e-b*d);
    y = ((-1)*d*c + a * f)/(a * e - b* d);
    printf("%f %f\n",x,y);
  }
  return 0;
}

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

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

	while (1) {
		cin>>a>>b>>c>>d>>e>>f;
		if (cin.eof()) break;

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

		cout<<setiosflags(ios::fixed)<<x<<" "<<y<<endl;
	}

	return 0;
}