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

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

C++: /*
  Name : Dipu Kumar Mohanto
  Problem : C
  BRUR Weekend Practice Contest on May 19, 16
*/
#include <algorithm>
#include <iostream>
#include <iterator>
#include <numeric>
#include <sstream>
#include <fstream>
#include <cassert>
#include <climits>
#include <cstdlib>
#include <cstring>
#include <string>
#include <cstdio>
#include <vector>
#include <cmath>
#include <queue>
#include <deque>
#include <stack>
#include <list>
#include <map>
#include <set>

#define SET(a) memset(a, -1, sizeof(a));   /// When dp[] & use for blank all position
#define CLR(a) memset(a, 0, sizeof(a));     /// When dp[] & use for NULL or 0 all position
#define MEM(x,y) memset(x,y,sizeof(x));  /// When dp[][] & use for blank all position
#define maxall(v) *max_element(v.begin(),v.end());  /// Find maximum value from the vector
#define minall(v) *min_element(v.begin(),v.end());   /// Find minimum value from the vector
#define Sort(v) sort(v.begin(),v.end());     /// Sort the vector
#define un(v) Sort(v), v.erase(unique(v.begin(),v.end()),v.end());   /// Erase duplicate value from the vector
#define max3(a,b,c) max(a,max(b,c));    /// Find maximum value among 3 values
#define min3(a,b,c) min(a,min(b,c));        /// Find minimum value among 3 values
#define TFtoL(a) transform(a.begin(), a.end(), a.begin(), :: tolower) /// Convert the uppercase letter to lowercase in C++
#define TFtoU(a) transform(a.begin(), a.end(), a.begin(), :: toupper)
#define ull unsigned long long
#define PI 2*acos(0.0)

bool cmp(int a, int b){
     return a>b; }
int comp(void const *a, void const *b)  ///  Function for qsort $$ qsort(Name, Size, sizeof(int), comp);
{
    int *p, *q;
    p = (int *) a;
    q = (int *) b;
    return (*p - *q);
}
const int N = 3e5+2;
const int INF=0x7FFFFFFF;    /// Heighest value of int

using namespace std;

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

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

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

    return 0;
}

C++: #include<stdio.h>
int main(void) {
	int a, b, c, d, e, f, g, h=0;
	while (h<2)
	{
		scanf("%d %d %d %d %d %d", &a, &b, &c, &d, &e, &f);
		for (double x = -1000; x <= 1000; x++)
		{
			for (double y = -1000; y <= 1000; y++)
			{
				if (a*x + b*y == c&&d*x + e*y == f)
				{
					printf("%.4f %.4f", x, y);
				}
			}
		}
		h++;
	}

	return 0;
}

C++: #include <cstdio>

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

C++: #include"stdio.h"


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

C++: #include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <sstream>

using namespace std;

using DataSet = vector<double>;


void readInputData(vector<string>& input_data){
    string buff;
    while(getline(cin, buff)){
        input_data.push_back(buff);
    }
}

void _parseString(const string& input_data, DataSet& data_set) {
    data_set.resize(6);

    stringstream ss;
    ss << input_data;
    ss >> data_set[0] >> data_set[1] >> data_set[2]
        >> data_set[3] >> data_set[4] >> data_set[5];
}

void parseString(const vector<string>& input_data, vector<DataSet>& data_set) {
    data_set.resize(input_data.size());
    for(int i = 0; i < input_data.size(); ++i) {
        DataSet buff;
        _parseString(input_data[i], buff);
        data_set[i] = buff;
    }
}

double determinant2d(const DataSet& data){
    return data[0] * data[4] - data[1] * data[3];
}

void inverse2d(DataSet& data){
    double t = data[0];
    data[0] = data[4];
    data[4] = t;

    data[1] = -data[1];
    data[3] = -data[3];
}


void calculateXY(const DataSet& data, double det, vector<double>& result){
    result.resize(2);

    result[0] = (data[0] * data[2] + data[1] * data[5]) / det;
    result[1] = (data[3] * data[2] + data[4] * data[5]) / det;
}

void solve(vector<DataSet>& data_set){
    cout << fixed;
    cout << setprecision(3);

    for(int i = 0; i < data_set.size(); ++i){
        vector<double> buff;

        double det = determinant2d(data_set[i]);

        inverse2d(data_set[i]);

        calculateXY(data_set[i], det, buff);

        cout << buff[0] << " " << buff[1] << endl;
    }
}




void doAllProcess(){
    vector<string> input_data;
    readInputData(input_data);

    vector<DataSet> data_set;
    parseString(input_data, data_set);

    solve(data_set);
}


}

int main(){
    doAllProcess();
    return 0;
}

C++: #include <iostream>
#include <sstream>
#include <string>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <iomanip>
#include <queue>
using namespace std;


int GetDigit(int n){
	int i = 0;

	while(n > 0){
		n /= 10;
		i++;
	}

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

	cout.flags(ios::fixed);
	cout.precision(3);
	
	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);

		if(x == -0.0) x = abs(x);
		if(y == -0.0) y = abs(y);
		cout << x << ' ' << y << endl;
	}

	return 0;
}

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), (c*d-a*f)/(b*d-a*e));
	}
}

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

int main(){
	int i = 0;
	double a, b, c, d, e, f;
	double x[2], y[2];
	while (i<=1){
		cin >> a >> b >> c >> d >> e >> f;
		x[i] = (c*e - f*b) / (a*e - b*d);
		y[i] = (c - a*x[i])/b;
		i++;
	}
	for (int j = 0; j < 2; j++){
		cout << fixed << setprecision(3) << x[j]+0.0001 << " " << setprecision(3) << y[j] +0.0001<< '\n';
	}

	return 0;
}

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

double shisyagonyu(double x){
  if(x>0){
    x += 0.0005;
  }
  if(x<0){
    x -= 0.0005;
  }
  return x;
}

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

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

    /*std::cout << x;
    std::cout << " " << y << std::endl;

    x = shisyagonyu((c*e-b*f)/(a*e-b*d));
    y = shisyagonyu((a*f-c*d)/(a*e-b*d));
*/
    std::cout << std::fixed;
    std::cout << std::setprecision(3) << x;
    std::cout << " " << y << std::endl;

  }
}

C++: // R_triangle.cpp : 螳壻ケ画而蛻カ蜿ー蠎皮畑遞句コ冗噪蜈・蜿」轤ケ縲?//

#include<iostream>
#include<iomanip>
using namespace std;

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