Go: package main

import "fmt"

func main() {
	var Xs, Ys []float32
	Xs = make([]float32, 0)
	Ys = make([]float32, 0)
	var cnt 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
		}
		y = (((a * f) - (d * c)) / ((a * e) - (b * d)))
		x = ((c - (b * y)) / a)
		Xs = append(Xs, x)
		Ys = append(Ys, y)
		cnt++
	}
	for i := 0; i < cnt; i++ {
		fmt.Printf("%.3f %.3f\n", Xs[i], Ys[i])
	}
}

Python: from decimal import Decimal,ROUND_HALF_UP,ROUND_HALF_EVEN
while True:
    try:
        a,b,c,d,e,f=map(int,input().split())
        x=(c*e-b*f)/(a*e-b*d)
        y=(a*f-c*d)/(a*e-b*d)
        if x==-0:
            x=int(x)
        if y==-0:
            y=int(y)
        X=Decimal(x).quantize(Decimal('0.001'),rounding=ROUND_HALF_UP)
        Y=Decimal(y).quantize(Decimal('0.001'),rounding=ROUND_HALF_UP)
        print(f'{X:3f}',f'{Y:3f}')
    except EOFError:
        break

Python: import sys
strs = sys.stdin.readlines()
for s in strs:
    a, b, c, d, e, f = map(float, s.split())
    print('{:.3f} {:.3f}'.format((c*e - b*f) / (a*e - b*d), (a*f - c*d) / (a*e - b*d)))

Python: import sys
L = sys.stdin.readlines()
for line in L:
	A = line.split()
	a, b, c, d, e, f = [float(A[i]) for i in range(6)]
	x = (b * f - c * e) / (b * d - a * e)
	y = (c * d - a * f) / (b * d - a * e)
	if x == 0:
		x = 0
	print("{:.3f}, {:.3f}".format(x+0, y+0))

Python: import sys

for line in sys.stdin:
    a,b,c,d,e,f = [float(i) for i in line.split()]
    x = round((1/a)*(c-b*((a*f-c*d)/(a*e-b*d))),3)
    y = round((a*f-c*d)/(a*e-b*d),3)
    print(
        '{:.3f}'.format(x),'{:.3f}'.format(y),
    )

Python: 
import sys
import math

r = sys.stdin.readlines()

r.pop(0)

n = [[float(i) for i in (j.split())] for j in r] #n is list of each lines
    
for l in n:
    y = (l[2]*l[3]-l[0]*l[5])/(l[1]*l[3]-l[0]*l[4])+0
    
    x = (l[2]*l[4]-l[5]*l[1])/(l[0]*l[4]-l[3]*l[1])+0
    
    print("{:.3f} {:.3f} ".format(x,y))

Python: while True:
    try:
        a, b, c, d, e, f = map(int, input().split())
        tb, tc = d*b, d*c
        te, tf = a*e, a*f
        y = (tc-tf)//(tb-te)
        x = (c-(y*b))//a
        print("{:.3f} {:.3f}".format(x+0, y+0))

    except:
        break

Python: while True:
    try:
        a,b,c,d,e,f=map(int,input().split())
        m=b*d-e*a
        x=-(c*e-f*b)/m
        y=(c*d-f*a)/m
        if x==0:
            x=abs(x)
        if y==0:
            y=abs(y)
        print("{:.3f} {:.3f}" .format(x,y))
        
    except:
        break

Python: import sys

for line in sys.stdin:
    a, b, c, d, e, f = list(map(float, line.split()))
    x = (c * e - b * f) / (a * e - b * d)
    y = (a * f - c * d) / (a * e - b * d)
    print("{0:.3f} {1:.3f}".format(x + 0., y + 0.))

Python: import numpy as np
try:   
    a,b,c,d,e,f = (int(i) for i in input().split())
    x,y = (np.dot(np.linalg.inv(np.array([[a,b],[d,e]])),np.array([c,f]))[0],np.dot(np.linalg.inv(np.array([[a,b],[d,e]])),np.array([3,6]))[1])
    print(x,y)
except EOFError:
    break

Python: while(True):
    try:
        a,b,c,d,e,f= map(float,input().split(" "))
        det=e*a-b*d
        if(det!=0):
            x=(e*c-b*f)/det
            y=(f*a-c*d)/det
        print("{:.3f} {:.3f)".format(x+0,y+0))
    except:
        break

Python: while(True):
		try:
			a,b,c,d,e,f=map(float,input().split(" "))
			z=a*e-b*d
			if(z!=0):
				x=(c*e-b*f)/z
				y=(a*f-c*d)/z
			print("{:.3f} {:.3f}".format(x,y))
		except:
			break

C++: #include<iostream>
#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 ) / ( d * b - a * e );   //y = (cd - af) / (db - ae)
        x = ( c - b * y ) / a;                       //x = (c -  by) / a

        cout << fixed;      //より正確に小数点以下の桁数を指定する.　setprecision(2)なら小数点3ケタを四捨五入して、小数点2桁きっちり表示
        cout << setprecision(3) << x << " " << y << endl;
    }

    return 0;
}

C++: #include <algorithm>
#include <iostream>
#include <vector>

using namespace std;

typedef long long ll;
typedef pair<ll, ll> P;

#define MOD 1000000007
#define REP(i, N) for (int i = 0; i < N; ++i)
#define REP1(i, N) for (int i = 1; i <= N; ++i)
#define RREP(i, N) for (int i = N - 1; i >= 0; --i)
#define ALL(a) a.begin(), a.end()

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

C++: #include<stdio.h>

void printFunc(int a,int b,int c,int d,int e,int f);

int main(){
  int a,b,c,d,e,f;
  float ansX,ansY;

  scanf ("%d %d %d %d %d %d\n",&a,&b,&c,&d,&e,&f);
  printFunc(a,b,c,d,e,f);
  scanf ("%d %d %d %d %d %d\n",&a,&b,&c,&d,&e,&f);
  printFunc(a,b,c,d,e,f);

  return 0;
}

void printFunc(int a,int b,int c,int d,int e,int f){
  if(b == 0 || e == 0){
    ansY = 0;
  }
  else{
    ansY = (float)(b*f - e*c)/(float)(b*d - e*a);
  }

  if(a == 0 || d == 0){
    ansX = 0;
  }
  else{
    ansX = (float)(c*e - f*b)/(float)(a*e - d*b);
  }

  printf("%.3f %.3f\n",ansX,ansY);
}

C++: #include <cstdio>

using namespace std;

int main()
{
  double a, b, c, d, e, f;
  while(scanf("%lf%lf%lf%lf%lf%lf", &a, &b, &c, &d, &e, &f) != -1){
    double y = 0, x = 0;
    double g = e * a;
    double h = f * a;
    double i = b * d;
    double j = c * d;
    double k = i - g;
    double l = j - h;
    y = l / k;
    x = (c - b*y) / a;

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

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

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

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

double calc_Det(double, double, double, double);
 
int main() {
    double a, b, c, d, e, f;
    double x, y;
 
    while (cin >> a >> b >> c >> d >> e >> f) {
        x = (double)calc_Det(c, b, f, e) / calc_Det(a, b, d, e);
        y = (double)calc_Det(a, c, d, f) / calc_Det(a, b, d, e);

        if (fabs(x) < 1e-3) { x = 0.0; }
        if (fabs(y) < 1e-3) { y = 0.0; }
        printf("%.3f %.3f\n", x, y);
    }
}
 
double calc_Det(double a, double b, double c, double d) {
    return a*d - b*c;
}

C++: /* All men have limits. They learn what they are and learn
   not to exceed them, I ignore mine. -Batman           */
#include <bits/stdc++.h>
//#include <iostream>
//#include <vector>
//#include <Windows.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=(double)(c*e-f*b)/(a*e-d*b);
	y=(double)(c*d-f*a)/(b*d-e*a);
	if(x>-0.001&&y>-0.001)printf("%.3lf %.3lf\n",abs(x),abs(y));
	else if(x>-0.001)printf("%.3lf %.3lf\n",abs(x),y);
	else if(y>-0.001)printf("%.3lf %.3lf\n",x,abs(y));
	else printf("%.3lf %.3lf\n",x,y);
		
}
return 0;
}

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

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