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<cstdio>
using namespace std;
int main(){
  int a,b,c,d,e,f;
  while(cin>>a>>b>>c>>d>>e>>f){
    double x,y;
    x=(e*c-b*f)/(a*e-b*d);
    y=(a*f-c*d)/(a*e-b*d);
    if(x==(-0.000))
      x=0.000;
    if(y==(-0.000))
      y=0.000;
    printf("%.3lf %.3lf\n",x,y);
  }
  return 0;
}

C++: #include<iostream>
#include<iomanip>
#include<algorithm>
using namespace std;
  
int main(){
  double 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;
    cout << fixed << setprecision(3) << x << " " << y << endl;
  }
  return 0;
}

C++: #include <cmath>
#include <string>
#include <sstream>
#include <iostream>
#include <algorithm>

int main(void) 
{
    std::string str;
    double a, b, c, d, e, f;
    double x, y;

    while (getline(std::cin, str)) {
        std::istringstream str_s(str);

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

        if (c*e - b*f == 0) 
            x = 0;
        else
            x = (c*e - b*f) / (a*e - b*d);

        if (c*d - a*f == 0)
            y = 0;
        else
            y = (c*d - a*f) / (b*d - a*e);

        x = (double)round(x*1000)/1000;
        y = (double)round(y*1000)/1000;

        std::cout.setf(std::ios::fixed);  
        std::cout.precision(3);

        std::cout << std::showpoint << 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) {
		double y = (a * f - c * d) / (a * e - b * d);
		double x = (c - b * y) / a;
		cout << fixed << setprecision(3) << x << " " << y << endl;
	}
	return 0;
}

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

int main(){
	
	double a, b, c, d, e, f, x=0, y=0; // ???????°???°?????°??? %f
	while(cin >> a >> b >> c >> d >> e >> f){
		x = (double)( (b*f-c*e)/(b*d-a*e) );
		y = (double)( (a*f-c*d)/(a*e-b*d) );
		if(x == 0) x = 0.000;
		if(y == 0) y = 0.000;

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

C++: #include<stdio.h>
#define rep(i,m,n) for(i = m;i < n;i++)
int main(){
	double a[6];
	int i,kcor = 0;
	double kx[1000] = {0},ky[1000] = {0};
	while(scanf("%lf",a)!=-1){
		rep(i,1,6)
			scanf("%lf",a+i);
		double det;
		det = a[0]*a[4]-a[1]*a[3];
		kx[kcor] = (a[4]*a[2]-a[1]*a[5])/det;
		ky[kcor] = (-a[3]*a[2]+a[0]*a[5])/det;
		kcor++;
	}
	rep(i,0,kcor){
		printf("%.3lf %.3lf\n",kx[i],ky[i]);
		//printf("%lf %lf\n",kx[i],ky[i]);
	}
	return 0;
}

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

using namespace std;

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

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define REPR(i,n) for(int i=n; i>-1; --i)
#define ALL(a) (a).begin(),(a).end()
#define FILL(a,x); REP(i,sizeof(a)){ (a)[i]=(x); }
#define CINA(a,n); REP(i,(n)){ cin >> (a)[i]; }
#define FILL2(a,n,m,x); REP(i,(n)){ REP(j,(m)){(a)[i][j]=(x);} }
#define CINA2(a,n,m); REP(i,(n)){ REP(j,(m)){cin >> (a)[i][j];} }
#define Liny "Yes\n"
#define Linn "No\n"
#define LINY "YES\n"
#define LINN "NO\n"

#define umap unordered_map
//cout << setfill('0') << right << setw(4) << 12; // "0012"
int keta(ll x){ if(x<10){return 1;} else{return keta(x/10) + 1;}}
int keta_wa(ll x){ if(x<10){return x;} else{return keta_wa(x/10) + x%10;} }
int ctoi(char c){ return ( (c>='0' && c<='9')? c - '0': 0 );}
ll sum(ll a[],ll N){ return accumulate(a,a+N,0LL);}
ll gcd(ll a,ll b){if(a<b)swap(a,b); return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b){if(a<b){swap(a,b);} return a/gcd(a,b)*b;}

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

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

    cout << x << " " << y << endl;
  }
}

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

int main(void){
	double a,b,c,d,e,f;
	double x,y;
	cout.precision(3);
	cout << setiosflags(ios::fixed);
	while(cin >> a >> b >> c >> d >> e >> f ){
		b/=a; c/=a; a=1.0;
		e/=d; f/=d; d=1.0;
		y=(c-f)/(b-e);
		x=c-b*y;
		cout << x << " " << y << endl;
	}
	return 0;
}

C++: #include<iostream>
#include<iomanip>
#include<vector>
#include<map>
#include<string>
using namespace std;

/*
??£???????¨????
	ax + by = c
	dx + ey = f
????§£x, y???????????????????????°??????
*/
int main() {
	double a, b, c, d, e, f;
	int cnt = 0;						//??\??????????????£???????¨????????????°
	std::vector<double> x_vector;		//x????§£???????´?
	std::vector<double> y_vector;		//y????§£???????´?

#if 0
	while (cnt < 2) {
		cin >> a >> b >> c >> d >> e >> f;
#else
	while (cin >> a >> b >> c >> d >> e >> f) {
#endif
		double x = (b * f - c * e) / (b * d - a * e);
		double y = (c * d - a * f) / (b * d - a * e);

		cnt++;
		x_vector.push_back(x);
		y_vector.push_back(y);
	}

	for (unsigned int i = 0; i < cnt; i++) {
		double x_result = round(x_vector[i] * 1000) / 1000;
		double y_result = round(y_vector[i] * 1000) / 1000;

		std::cout << std::fixed;
		std::cout << std::setprecision(3) << x_result << " ";
		std::cout << std::setprecision(3) << y_result << endl;
	}

	//???????????°
	//while (1);

	return 0;
}

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

int main(){
	
	int a,b,c,d,e,f;
	
	while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f) != -1){
		
		double del = a*e - b*d;
		printf("%.3lf %.3lf\n",(e*c-b*f)/del,(-d*c+a*f)/del);
	}
	
	return 0;
}

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

double ans(double a,double b,double c,double d,double e,double f){
    double y1=b*d;
    double a1=c*d;
    double y2=e*a;
    double a2=f*a;
    double y=y1-y2;
    double a3=a1-a2;
    return a3/y;
}

int main(){
    double a,b,c;
    double d,e,f;
    cin>>a>>b>>c;
    cin>>d>>e>>f;
    double x=ans(b,a,c,e,d,f);
    double y=ans(a,b,c,d,e,f);
    if(x<0||0.0005+x>=0){
        x=-x;
    }
    if(y<0||0.001+y>0){
        y=-y;
    }
    cout<<fixed<<setprecision(3)<<x<<' '<<setprecision(3)<<y<<endl;
}

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

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

using namespace std;

int main(void)
{
    const double eps = 1e-9;
    string str;
    double a, b, c, d, e, f;
    while(cin >> a >> b >> c >> d >> e >> f){
        double delta = a * e - b * d;
        double x = 1.0 / delta * (c * e - b * f) + eps;
        double y = 1.0 / delta * (-d * c + a * f) + eps;
        printf("%.3f %.3f\n", x, y);
    }
    
    return 0;
}