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 := cF / bE
		x := (c - (y * b)) / a

		fmt.Printf("%d.000 ", x)
		fmt.Printf("%d.000\n", y)
	}
}

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

using namespace std;

int main (void) {
    int a, b, c, d, e, f;
    double x, y;
    while (1) {
        cin >> a;
        cin >> b;
        cin >> c;
        cin >> d;
        cin >> e;
        cin >> f;
        if (cin.eof()) break;
        x = (double)(c * e - b * f) / (double)(a * e - b * d);
        y = (double)(c * d - a * f) / (double)(b * d - a * e);
        cout << fixed << setprecision(3) << x << ' ' << y << endl;
    }
    return 0;
}

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

using namespace std;

double solutionY();
double solutionX(double);
double a1,b1,c1,d1,e1,f1;

int main(){
  double x,y,xO,yO;
  
  cin >> a1 >> b1 >> c1 >> d1 >> e1 >> f1;
  
  y = solutionY();
  x = solutionX(y);
 
  cout << fixed << setprecision(3) << x << " " << y << endl; 
}

double solutionY(){
  double b,c,e,f;
  b = b1/a1;
  c = c1/a1;

  e = e1/d1;
  f = f1/d1;
  
  return (c - f)/(b - e);
}

double solutionX(double y){
  double b,c;
  b = b1/a1;
  c = c1/a1;
  
  return (c - b*y);
}

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

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

C++: #include <cmath>
#include <cstdlib>
#include <cstdio>

#include <iostream>
#include <vector>
#include <algorithm>

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

  for(;;) {
    std::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);

    x = (double)(long)(x*1000);
    y = (double)(long)(y*1000);

    x /= 1000;
    y /= 1000;    

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

    if( std::cin.eof() ) {
      break;
    }
  }

  return 0;
}

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);
	}
}