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;

double delta(double o, double p, double q , double r, double s, double t) {

	//cout << "o=" << o << "s=" << s << "v=" << "r=" << "o*s-p*r=" << (o*s-p*r)  << endl;

	// |o  p ||x|   |q|
	// |r  s ||y| = |t|

	return (o*s-p*r);//a???o b???p c???q d???r e???s f???t
}

double deltacfbe(double o, double p, double q , double r, double s, double t) {

	//cout << "o=" << o<< "s=" << s << "p=" << "r=" << "q*s-p*t=" << q*s-p*t  << endl;

	// x = |q  p | /delta
	//     |t  s | 

	return (q*s-p*t);
}

double deltaadcf(double o, double p, double q , double r, double s, double t) {

	//cout << "o=" << o<< "s=" << s << "p=" << "r=" << "o*t-q*r=" << o*t-q*r  << endl;

	// y = |o  q | /delta
	//     |r  t | 

	return (o*t-q*r);
}

int main() {

	double a, b, c, d, e, f;
	
	while (cin >> a >> b >> c  >> d >> e >> f){

	cout.showpoint;



	cout << fixed << setprecision(3) << (deltacfbe(a,b,c,d,e,f)/delta(a,b,c,d,e,f)) , (deltaadcf(a,b,c,d,e,f)/delta(a,b,c,d,e,f)) << endl;
	
	}

	return 0;
}

C++: #include <cstdio>

using namespace std;

int GCD(int x, int y)
{
    if (y == 0) return x;
    
    return GCD(y, x % y);
}

int LCM(int x, int y)
{
    return x / GCD(x, y) * y;
}

int main() {
	int a, b, c, d, e, f;
	int _a, _b, _c, _d, _e, _f;
	double x, y;
	int _x, _y, _z;
	int multiTop, multiBottom;
	int common;
	
	while (scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f) != EOF) {
	    common = LCM(a, d);
	    multiTop = common / a;
	    multiBottom = common / d;
	    
	    _a = common;
	    _b = b * multiTop;
	    _c = c * multiTop;
	    
	    _d = common;
	    _e = e * -multiBottom;
	    _f = f * -multiBottom;
	    
	    _y = _b + _e;
	    _z = _c + _f;
	    
	    y = (double)_z / (double)_y;
	    
	    _c = c - (b * y);
	    
	    x = (double)_c / (double)a;
	    
	    printf("%.3f %.3f\n", x, y);
	}
	
	return 0;
}

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

int main(void) {
	int a, b, c, d, e, f, x, y;
	while (std::cin >> a >> b >> c >> d >> e >> f) {
		x = (double)((f*b - e*c) / (d*b - e*a));
		y = (double)((f*a - d*c) / (e*a - d*b));
		std::cout << std::fixed << std::setprecision(3) << x << ' ' << y << std::endl;
	}

	return 0;
}

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

#define doubled( x ) (x * x)

//?????????????¨????(2 * 2??£?????????)
int matrix_val(int a11, int a12, int a21, int a22);

//?????°?????°?????? (in:??´??° out:?????°)
int digit_count(int num);

using namespace std;

int main()
{
	int a, b, c, d, e, f;
	
	cin >> a >> b >> c ;
	cin >> d >> e >> f;
	do
	{
		int A_matrix_val = matrix_val(a, b, d, e);
		int elem_x = matrix_val(c, b, f, e);
		int elem_y = matrix_val(a, c, d, f);
		double ans_x, ans_y;
		
		if( elem_x == 0 )ans_x = 0;
		else ans_x = (double)elem_x / A_matrix_val;
		
		if( elem_y == 0 )ans_y = 0;
		else ans_y = (double)elem_y / A_matrix_val;
		
		printf("%.3f %.3f\n", ans_x, ans_y);

	}while( (cin >> a >> b >> c >> d >> e >> f) );
	
	return 0;
}

int matrix_val(
int a11, int a12,
int a21, int a22
){
	return ((a11 * a22) - (a12 * a21));
}

int digit_count(int num)
{
	if( num < 0 )num *= (-1);
	
	int count = 0;
	
	for(int i = 10; num != 0; i *= 10)
	{
		int diff = num % i;
		num -= diff;
		count++;
	}
		
	return count;
}

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

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

	while(1){
		cin >> a >> b >> c >> d >> e >> f;

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

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

		if(x == 0){
			x = 0;
		}
		if(y == 0){
			y = 0;
		}

		cout << fixed << setprecision(3) << x << " ";
		cout << fixed << setprecision(3) << y << endl;
	}

	return 0;
}

C++: #include<stdio.h>
int main(){
    double a,b,c,d,e,f;
    double db,dc,ae,af;
    double ny,n;
    double y;
    double x;
    while(scanf("%lf%lf%lf%lf%lf%lf",&a,&b,&c,&d,&e,&f)!=EOF){
        db=d*b;
        dc=d*c;
        ae=a*e;
        af=a*f;
        ny=db-ae;
        n=dc-af;
        y=n/ny;
        x=c-y*b/a;
        printf("%lf %lf\n",x,y);
    }
    return 0;
}

C++: #include<cstdio>
#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){
    x = (c*e - b*f)/(a*e - b*d);
    y = (a*f - c*d)/(a*e - b*d);
    cout <<fixed<<setprecision(3)<<x<<" "<<y<<endl;
  }
  return 0;
}

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

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

C++: #include <iostream>
#include <iomanip>
#include <algorithm>
using namespace std;
float a,b,c,d,e,f;
float findoutx,findouty;
float x,y,yadd;
float Timers1,Timers2;
int main()
{
    while((cin >> a >> b >> c >> d >> e >> f))
    {
    Timers1 = a;
    Timers2 = d;
    a=a*Timers2;
    b=b*Timers2;
    c=c*Timers2;
    d=d*Timers1;
    e=e*Timers1;
    f=f*Timers1;

    findouty=b-e;
    yadd = c-f;
    findouty = yadd/findouty;
    b = b*findouty;
    findoutx=(c-b)/a;

    if(findoutx==0)findoutx=0;
    if(findouty==0)findouty=0;



    cout<<fixed<<setprecision(3)<<findoutx << " " <<findouty<<endl;
    }

return 0;
}

C++: #include<iostream>
#include<cmath>
#include<iomanip>
double pow(double x,double y);
using namespace std;
int main(){
  double a,b,c,d,e,f,x,y,g,z,aa,bb;
  while(cin>>a){
    cin>>b>>c>>d>>e>>f;
    g=b;
    z=c;
    c*=d;
    b*=d;
    e*=a;
    f*=a;
    b-=e;
    c-=f;
    y=c/b;
    g*=y;
    z-=g;
    x=z/a;
    aa=round(x);
    bb=round(y);
    cout<<fixed;
    cout<<setprecision(3)<<aa<<' '<<setprecision(3)<<bb<<' '<<endl;
  }
  return(0);
}