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 <iostream>
#include <vector>
#include <cmath>
using namespace std;


int main(){
	vector<double> ans_x;
	vector<double> ans_y;
	double a, b, c, d, e, f;
	double tb, tc, te, tf;
	double x, y;
	int i, cnt=0;
	while(cin>>a>>b>>c>>d>>e>>f){
		tb=b*d;
		tc=c*d;
		te=e*a;
		tf=f*a;
		tb-=te;
		tc-=tf;
		y=tc/tb;
		x=(c-b*y)/a;
		x *= 1000;
		x += 0.5;
		x = floor(x);
		x /= 1000;
		y *= 1000;
		y += 0.5;
		y = floor(y);
		y /= 1000;
		ans_x.push_back(x);
		ans_y.push_back(y);
		cnt++;
	}
	for(i=0;i<cnt;i++){
		cout.precision(4);
		cout.setf(ios::showpoint);
		cout << ans_x[i] << ' ' << ans_y[i] << endl;
	}
	return 0;
}

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

int main(){
    float a, b, c, d, e, f, x, y, dividedNum1, dividedNum2 = 0;
    while(cin >> a >> b >> c >> d >> e >> f){
        dividedNum1 = a;
        dividedNum2 = d;
        a /= dividedNum1;
        b /=dividedNum1;
        c /= dividedNum1;
        d /= dividedNum2;
        e /= dividedNum2;
        f /= dividedNum2;
        
        float temp1 = b - e;
        float temp2 = c - f;
        
        y = floor(((temp2 / temp1) + 0.0005) * 1000) / 1000;
        x = floor((c - (b * y) + 0.0005)* 1000) / 1000;
        
        cout << fixed << setprecision(3) << x << " " << fixed << setprecision(3) << y << endl;
    }
    return 0;
}

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

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

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

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

	printf("%.3d %.3d", x, y);

	return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main()
{
	int s = 100000;
	int n;
	cin >> n;
	while (n--) {
		if (int(s*1.05) % 1000 == 0) {
			s = int(s*1.05);
		}
		else {
			s = int(s*1.05) + (1000 - int(s*1.05) % 1000);
		}
	}
	printf("%d\n", s);
    return 0;
}

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

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

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

int main(){
	
	double a, b, c, d, e, f;
	// input
	while(std::cin >> a >> b >> c >> d >> e >> f){
		
		/*	solve the equation
		*	y = (f - d*x) / e
		*	x = (c*e - b*f) / (a*e - b*d)
		*/
		double x = (c*e - b*f) / (a*e - b*d);
		double y = (f - d*x) / e;
		
		// need this process for submitting
		if(x == -0)	x = 0;
		if(y == -0)	y = 0;
		
		// output
		std::cout << std::fixed << std::setprecision(3) << x << " " << y << std::endl;
	}
	
	return 0;
}

C++: #include <iostream>
#include <cstdio>
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 - ((b * f) / e)) / (a - ((b * d) / e)), (c - ((a * f) / d)) / (b - ((a * e) / d)));
  }

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

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

int main(){

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

        cout << setiosflags(ios::fixed) << setprecision(3);
        cout << x << ' ' <<  y  << endl;
     }
         
	return 0;
}

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

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

	return 0;
}

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

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

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