Go: package main

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

func gcd(num1, num2 int) int {
	if num2 == 0 {
		return num1
	}
	num3 := num1 % num2
	return gcd(num2, num3)
}

func lcm(num1, num2 int) int {
	if num1%num2 != 0 {
		num3 := gcd(num1, num2)
		for i := 1; ; i++ {
			check := num3 * i
			if check%num1 == 0 && check%num2 == 0 {
				return check
			}
		}
	} else {
		return num1
	}
}

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	for scanner.Scan() {
		strNums := strings.Fields(scanner.Text())
		nums := []int{}
		for _, strNum := range strNums {
			num, _ := strconv.Atoi(strNum)
			nums = append(nums, num)
		}
		a := nums[0]
		b := nums[1]
		c := nums[2]
		d := nums[3]
		e := nums[4]
		f := nums[5]
		lcm := lcm(a, d)
		mulA := lcm / a
		mulD := lcm / d
		a *= mulA
		b *= mulA
		c *= mulA
		d *= mulD
		e *= mulD
		f *= mulD

		if d < 0 {
			d *= -1
			e *= -1
			f *= -1
		}

		bE := b - e
		cF := c - f
		y := float64(cF) / float64(bE)
		x := (float64(c) - (y * float64(b))) / float64(a)

		if x == 0 {
			fmt.Printf("%.3f ", 0.0)
		} else {
			fmt.Printf("%.3f ", x)
		}
		if y == 0 {
			fmt.Printf("%.3f\n", 0.0)
		} else {
			fmt.Printf("%.3f\n", y)
		}
	}
}

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

int main(void){
    int a,b,c,d,e,f;
    double ansX,ansY;
    while(std::cin >> a >> b >> c >> d >> e >> f){
        ansX = (c*e - b*f) / (a*e - b*d);
        ansX *= 1000;
        if(ansX > 0) 
            ansX += 0.5;
        else 
            ansX -= 0.5;
        ansX = int(ansX);
        ansX /= 1000;
        
        ansY = (a*f - c*d) / (a*e - b*d);
        ansY *= 1000;
        if(ansY > 0) 
            ansY += 0.5;
        else
            ansY -= 0.5;
        ansY = int(ansY);
        ansY /= 1000;
        
        std::cout <<fixed << setprecision(3) << ansX << " " << fixed << setprecision(3)<<ansY << std::endl;
    }
    
    return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
int main() {

    double a, b, c, d, e, f, x, y;
    while(scanf("%lf %lf  %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f) == 6) {
        x = (-(c*e) + (b*f)) / (-(a*e) + (b*d));
        y = ((c*d) - (a*f)) / ((b*d) - (a*e));
        printf("%.3f %.3f\n",x,y);
    }

    return 0;
}

C++: #include <stdio.h>

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

C++: #include <iostream>
#include <cstdio>
int main()
{
    double a,b,c,d,e,f,y,x;
    while(std::cin >> a >> b >> c >> d >> e >> f) 
    {
        if(a!=0)
            y = (double)( (c / a) - (f / d) ) / ( (b / a) - (e /d ));
        else
            y = (double)(c / b); 
        if(b!=0)
            x = (double)( c / a ) - ( b / a ) * y;
        else
            x = (double)(f / d);
        if(x==0)x=0;
        if(y==0)y=0;
        printf("%.3lf %.3lf",x,y);
    }  
    return 0;
}

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

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

using namespace std;

int main (int argc, char * const argv[]) {
    // insert code here...
    double a, b, c, d, e, f, x, y;
	while(cin >> a >> b >> c >> d >> e >> f ){
		x=(c*e-b*f)/(a*e-b*d);
		y=(c*d-a*f)/(b*d-a*e);
		//cout << fixed<< setprecision(3) << x << " " << y << endl;
		
		printf("%.3f %.3f\n", x, y);
	} 
	return 0;
}

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

int main(void){
  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) - (d * b));
    x = (c - (b * y)) / a;
    printf("%,3lf %.3lf\n", x, y);
  }
  return 0;
}

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

int main(){
  double a, b, c, d, e, f, x, y;
  while(cin >> a >> b >> c >> d >> e >> f){
    x=(c*e-b*f)/(a*e-d*b)+0.0001;
    y=(c*d-a*f)/(b*d-a*e)+0.0001;
    // x=round(x*1000)/1000;
    // y=round(y*1000)/1000;
    cout << fixed << setprecision(3) << x << " " << setprecision(3) << y << endl;
  }

  return 0;
}

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

using namespace std;

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

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

int main(){
    std::ios::sync_with_stdio(false);
    std::cin.tie(0);

    double a, b, c, d, e, f;
    while(std::cin >> a >> b >> c >> d >> e >> f){
        std::cout << std::fixed << std::setprecision(3) << std::round(1000*(c*e-b*f)/(a*e-b*d))/1000 << " " << std::round(1000*(a*f-c*d)/(a*e-b*d))/1000 << "\n";
    }
    
    return 0;
}

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


/*
//my header
#include "define.h"
#include "geometry.h"*/

#define MyAbs(a) ((a)>0?(a):-(a))
#define MyEqualDoule(a,b) (MyAbs(a-b)<1e-6)

void init()
{
#ifdef _WIN32
	freopen("1.txt", "r", stdin);
#endif
}

void func();

int main()
{
	init();
	func();

	return 0;
}


void func()
{
	int a,b,c,d,e,f;
	float x, y;
	while(~scanf("%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f))
	{
			x = (c*e-f*b)*1.0f/(a*e - b*d);
			y = (c*d-a*f)*1.0f/(b*d - a*e);
		printf("%.3f %.3f\n", x, y);
	}
}

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


int main() {
  double a, b, c, d, e, f;
  double x, y;
  cout << setprecision(3) << fixed;
    while(cin >> a >> b >> c >> d >> e >> f) {
    x=(b*f-c*e)/(b*d-a*e);
    x = round(x * 1000) / 1000.0;
    if (x == -0.0) x = 0.0;
    
    cout<<x;
    cout<<" ";
    
    y=(c*d-a*f)/(b*d-a*e);
    y = round(y * 1000) / 1000.0;
if (y == -0.0) y = 0.0;
    cout<<y;
    cout<<endl;
  }
  
  return 0;
}

C++: #include<stdio.h>
int main()
{
	int X,Y;
	double a,b,c,d,e,f,x=0,y=0;
	while(scanf("%lf %lf %lf %lf %lf %lf",&a,&b,&c,&d,&e,&f)!=EOF)
	{
		y=(c*d-f*a)/(b*d-e*a);
		x=(c*e-f*b)/(a*e-d*b);
		if(x>=0)
			x+=0.0005;
		else
			x-=0.0005;
		if(y>=0)	
			y+=0.0005;
		else
			y-=0.0005;
		X=x*1000;
		Y=y*1000;
		x=X/1000;
		y=Y/1000;
		printf("%.3f %.3f\n",x,y);
	}
	return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int b,a,e,d,f,i,c;
	float y,x;
	while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)!=EOF)  {
			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<cstdio>
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-b*y)/a;
  if(x==-0)x=0;
  if(y==-0)y=0;
  printf("%.3f %.3f\n",x,y);
}

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

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