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<string>
//0001
#include<cstddef>
#include<queue>
#include<vector>
//0003
#include<algorithm>
#include<iomanip>
#include<math.h>
using namespace std;

int main() {
	//0000
	/*
	int i, j;

	for (i = 1; i < 10; i++) {
		for (j = 1; j < 10; j++) {
			cout << i << "x" << j << "=" << i*j << endl;
		}
	}
	*/
	//0001
	/*
	int i;
	const size_t MNum = 10;
	int MHeight[MNum];
	int MH1 = 0, MH2 = 0, MH3 = 0;
	for (i = 0; i < 10; i++) {
		cin >> MHeight[i];
		if (MHeight[i] > MH1) {
			MH3 = MH2;
			MH2 = MH1;
			MH1 = MHeight[i];
		}
		else if (MHeight[i] > MH2) {
			MH3 = MH2;
			MH2 = MHeight[i];
		}
		else if (MHeight[i] > MH3) {
			MH3 = MHeight[i];
		}
	}
	cout << MH1 << endl << MH2 << endl << MH3 << endl;
	*/
	/*
	priority_queue<int, vector<int>, less<int> > que;
	int MH;

	for (int i = 0; i < 10; i++) {
		cin >> MH;
		que.push(MH);
	}

	for (int j = 0; j < 3; j++) {
		cout << que.top() << endl;
		que.pop();
	}
	*/
	//0002
	/*
	int a, b;
	while (cin >> a >> b) {
		int sum = a + b;
		int count = 0;
		while (sum > 0) {
			sum = sum / 10;
			count++;
		}
		cout << count << endl;
	}
	*/
	//0003
	/*
	int a[3];
	int N;
	cin >> N;
	for (int i = 0; i < N; i++) {
		cin >> a[0] >> a[1] >> a[2];
		sort(a, a + 3);
		if (a[0] * a[0] + a[1] * a[1] == a[2] * a[2]) {
			cout << "YES" << endl;
		}
		else {
			cout << "NO" << endl;
		}
	}
	*/
	double a,b,c,d,e,f;
	double x, y;
	int xi, yi;
	//???????????£??¨?????????????????§???????????????
	while (
		cin >> a
		>> b
		>> c
		>> d
		>> e
		>> f
		) {
		x = (e*c - b*f) / (e*a - b*d);
		y = (a*f - c*d) / (e*a - b*d);
		xi = roundf(x * 1000);
		yi = roundf(y * 1000);
		x = xi;
		x = x / 1000;
		y = yi;
		y = y / 1000;
		cout << fixed
			<< setprecision(3)
			<< x
			<< " "
			<< y
			<< endl;
	}
	return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <cmath>
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-b*d);
		y = (f-d*x)/e;
		if (fabs(x) < 1e-3) x = 0;
		if (fabs(y) < 1e-3) y = 0;
		printf("%.3f %.3f\n", x, y);
	}
	return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(){
long a,b,c,d,e,f;
double g;
for(;;){
cin>>a>>b>>c>>d>>e>>f;
if(cin.eof())break;
g=a*e-b*d;
printf("%.3f %.3f\n",(c*e-b*f)/g,(a*f-c*d)/g);
}
return 0;
}

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

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

  cout << x << " " << y << endl;
  cin >> a >> b >> c >> d >> e >> f;   
  y = (f-(d*c)/a)/(e-(d*b)/a);
  x = (c-b*y)/a;

  cout << x << " " << y << endl;
    
    
    
  return 0;

}

C++: #include<iostream>
#include<algorithm>
#include<stdio.h>
using namespace std;
int main(){
	int a,b,c,d,e,f;
	int o,p,q,r,s,t;
	float x,y;
	for(scanf("%d%d%d%d%d%d",&a,&b,&c,&d,&e,&f)!=EOF){
		o=a;p=b;q=c;r=d;s=e;t=f;
		o*=d;p*=d;q*=d;
		r*=a;s*=a;t*=a;
		//printf("%d %d %d %d %d %d \n",o,p,q,r,s,t);
		p-=s;
		q-=t;
		y=(float)(q/p);
		int g=(int)(e*y);
		g*=-1;
		x=(float)((f+g)/d);
		printf("%.3f %.3f",x,y);
	}
}

C++: #include "iostream"
#include "cstdio"
using namespace std;

int main(void)
{
    double a, b, c, d, e, f;
    int num;

    while(cin >> a >> b >> c >> d >> e >> f) {
        double num1 = a,num2 = d, x, y;
        a *= num2; b *= num2; c *= num2;
        d *= num1; e *= num1; f *= num1;

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

        x *= 10000; y *= 10000;
        num = (int)x; x = (double)num;
        num = (int)y; y = (double)num;
        num1 = (int)x % 10; num2 = (int)y % 10;

        x /= 10000; y /= 10000;

        if (num1 > 4) {
            x += 0.001;
        }
        if (num2 > 4) {
            y += 0.001;
        }

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

    }
    
    return 0;
}

C++: //08
#include<iostream>
#include<iomanip>
#include<cmath>

using namespace std;

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

C++: #include <iostream>
#include <iomanip>
using namespace std;
int main(){
    double a,b,c,d,e,f,x,y;
    while(cin>>a>>b>>c>>d>>e>>f){
        y=(c*d-f*a)/(b*d-e*a);
        x=(c*e-f*b)/(a*e-d*b);
        cout<<fixed<<setprecision(3)<<x+0.0005<<" "<<y+0.0005<<endl;
    }
}

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

C++: #include <iostream>
#include <stdio.h>
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-b*d);
		y = (f-d*x)/e;
		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;
	
	while( scanf(" %lf %lf %lf %lf %lf %lf", &a, &b, &c, &d, &e, &f) != EOF ){
		if(b==0){
			x=c/a;
			y=(f-d*x)/e;
		}
		else{
			if(e==0){
				x=f/d;
				y=(c-a*x)/b;
			}
			else{
				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);
	}

	return 0;
}

C++: #include "iostream"
#include "iomanip"
using namespace std;

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

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

}

C++: #include<iostream>
#include<iomanip>
#include <math.h>
double    round4(double src, int n){
	double dst;
	dst = src * pow(10, -n - 1);
	dst = (double)(int)(dst + 0.5);
	return    dst * pow(10, n + 1);
}

int main(){

	double a, b, c, d, e, f;
	double x, y;
	while (std::cin >> a >> b >> c >> d >> e >> f){
		if (a*d<0){
			d = -d;
			e = -e;
			f = -f;
		}

		x = (c - b*(c - f*a / d) / (b - e*a / d)) / a;
		y = (c - f*a / d) / (b - e*a / d);
		if (x == 0)x = 0;
		if (y == 0)y = 0;
		round4(x, 4);
		round4(y, 4);
		std::cout<<std::fixed<<std::setprecision(4)  << x << " " << y << std::endl;
	}
	return 0;
	
}