Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

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]
		var mulA, mulD int
		if a < 0 {
			mulA = a * -1
		} else {
			mulA = a
		}
		if d < 0 {
			mulD = d * -1
		} else {
			mulD = d
		}
		a *= mulD
		b *= mulD
		c *= mulD
		d *= mulA
		e *= mulA
		f *= mulA

		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++: #include <iostream>
#include <cstdio>
#include <vector> 
#include <iomanip>
int main()
{
	std::vector<double> x, y;
	double a, b, c, d, p, q;
	while (scanf("%d %d %d %d %d %d", &a, &b, &p, &c, &d, &q) != EOF)
	{
		x.push_back((d*p - b*q) / (a*d - b*c));
		y.push_back((a*q - c*p) / (a*d - b*c));
	}

	for (int i = 0; i < x.size(); ++i)
		std::cout << std::setprecision(10) << x[i] << " " << y[i] << std::endl;
	return 0;
}

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

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

C++: #include <stdio.h>

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

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

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

C++: #include<iostream>
#include<stdio.h>
using namespace std;
int main(){
    float a,x,b,y,c,f,e,d,y2;
    while(cin>>a>>b>>c>>d>>e>>f){
        y2=b*e*y;
              x=(c*e-f*b-y2*2)/(a*e-d*b);
                y=(c-(a*x))/b;
        
        printf("%.3f %.3f",x,y);cout<<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) {
        x = (c * e - b * f) / (a * e - b * d);
        y = (c - a * x) / b;
        cout << fixed << setprecision(3) << x << " " << y << endl;
    }
    return 0;
}

C++: #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);
        if (x == -0.0) x = 0.0;
        if (y == -0.0) y = 0.0;
        cout << fixed << setprecision(3) << x << ' ' << y << endl;
    }
    return 0;
}

C++: #include <iostream>

using namespace std;

void solve()
{
	double a, b, c, d, e, f;
	while(cin >> a >> b >> c >> d >> e >> f)
	{
		double x, y;
		if(a != 0)
		{
			y = a / (a * e - b * d) * (f - c * d / a);
			x = (c - b * y) / a;
		}
		else
		{
			y = d / (b * d - a * e) * (c - a * f / d);
			x = (f - e * y) / d;
		}
		printf("%.3f %.3f\n", x, y);
	}
}

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

C++: #include <iostream>
#include <stdio.h>
#include <string>
#include <math.h>
#include <algorithm>
using namespace std;
int main(){
 double a, b, c, d, e, f;
 double x, y;
 while(cin >> a >> b >> c >> d >> e >> f){
  x = (c*e - b*f) / (a*e - b*d);
  y = (a*f - d*c) / (e*a - b*d);

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

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

 return 0; 
}

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

using namespace std;

int main(){
  double a,b,c,d,e,f;
  vector<double> al,bl,cl,dl,el,fl;
  double x,y,n,m;

  while(cin >> a >> b >> c >> d >> e >> f){
    al.push_back(a);
    bl.push_back(b);
    cl.push_back(c);
    dl.push_back(d);
    el.push_back(e);
    fl.push_back(f);
  }

  for(int i=0; i<al.size(); i++){
    n = bl[i]/el[i];
    m = al[i]/dl[i];
    x = (cl[i]-n*fl[i])/(al[i]-n*dl[i]); 
    y = (cl[i]-m*fl[i])/(bl[i]-m*el[i]);
    cout << setprecision(3) << fixed << x << " " << y << endl;
  }

  return 0;
}

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

int main(){
	
	int a,b,c,d,e,f;
	
	while(cin >> a >> b >> c >> d >> e >> f){
		double x,y;
		
		x = ((c*e)-(b*f))/((a*e)-(b*d));
		y = ((a*f)-(c*d))/((a*e)-(b*d));
		
		/*x *= 1000;
		y *= 1000;
		
		round(x);
		round(y);
		
		x /= 1000;
		y /= 1000;
		*/
		printf("%.3lf %.3lf\n",x,y);
	}
	
	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){
		x=(f-c*e/b)/(d-a*e/b);
		y=(f-c*d/a)/(e-b*d/a);

		cout << fixed << setprecision(4) << 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;
	while(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;
		if(q==0){
			y=0;
		}
		else{
		y=(float)(q/p);
		}
		int g=(int)(e*y);
		g*=-1;
		x=(float)((f+g)/d);
		printf("%.3f %.3f\n",x,y);
	}
}

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

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

double getValue(double val);

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

double getValue(double val)
{
    double result;
    val *= 1000;
    if(val >= 0.0){
        result = (int)(val + 0.5);
    }
    else{
        result = (int)(val - 0.5);
    }
    return result / 1000;
}

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

int main()
{
  int a,b,c,d,e,f;
  while(cin >> a >> b >> c >> d >> e >> f){
    double x,y;
    x = (double)(c*e-f*b)/(a*e-d*b);
    y = (double)(c*d-f*a)/(b*d-e*a);
    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;
    double x, y;
    while(cin >> a >> b >> c>>d>>e>>f){
        y = (a*f-d*c)/(a*e-b*d);
        x = (c-b*y)/a;
        printf("%.3f %.3f\n", x, y);
    }
}

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

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