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 <vector>
#include <cstdio>

using namespace std;

int main(void){
	double arr[6];
	vector<double> x,y;

	while (cin >> arr[0] >> arr[1] >> arr[2] >> arr[3] >> arr[4] >> arr[5]){
		double a = arr[0]; double b = arr[1]; double c = arr[2]; double d = arr[3]; double e = arr[4]; double f = arr[5];
		x.push_back((c*e-b*f)/(a*e-b*d));
		y.push_back((c*d-a*f)/(b*d-a*e));
	}
	for (unsigned int i=0; i<x.size(); ++i){
		printf("%.3lf %.3lf\n", x[i], y[i]);
	}
	return 0;
}

C++: #include <iostream>
#include<string>
#include<cmath>
#include<algorithm>
#include<cctype>
#include<queue>
#include<stack>
#include<stdio.h>
#include<vector>
#include<set>
#include<map>
#include<iomanip>
#define rep(i,n) for(int i=0;i<n;i++)
typedef int long long ll;

using namespace std;
int main(){

    double a,b,c,d,e,f;
    
    while(true){
        cin>>a;
        if(a==EOF)break;
        cin>>b>>c>>d>>e>>f;
        double h=a*e-b*d;
        double xx=(c*e-f*b);
        double yy=(a*f-c*d);
        
        double x=xx/h;
        double y=yy/h;
        printf("%.3f %.3f \n",x,y);
       
    }
return 0;
}

C++: 
/*

#include <iostream>
using namespace std;


int main(void)
{

int a, b, c, d, e, f;
cin >> a >> b >> c >> d >> e >> f;
double x, y;

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

system("pause");
return(0);
}
*/

#include<iostream>
using namespace std;
int main(void){
	double a, b, c, d, e, f;
	double x, y;
	while (cin >> a >> b >> c >> d >> e >> f){
		x = (double)((e*c - b*f) / (a*e - b*d));
		y = (double)((-(d*c) + a*f) / (a*e - b*d));
		if (x == 0){ x = 0; }
		if (y == 0){ y = 0; }
		printf("%.3f %.3f\n", x, y);
	}
}

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

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

  while(std::cin >>a>>b>>c>>d>>e>>f){

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

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

  }
}

C++: #include<cstdio>
#include<iostream>
using namespace std;
class GCDandLCM{
    public:
        void solve(int a,int b){
            int big=a,small=b;
            if(a<b){ 
                big=b;
                small=a;
                int tmp=a;
                a=b;
                b=tmp;
            }
            while(big%small!=0){ 
                int tmp=big%small;
                big=small;
                small=tmp;
            }
            printf("%d %d\n",small,(a*b)/small);
        }
};
int main(){ 
    GCDandLCM inst;
    int a,b;
    while(cin>>a>>b){ 
        inst.solve(a,b);
    }
}

C++: #include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
using namespace std;

typedef long long ll;
typedef pair<int, int> P;

#define all(c) (c).begin(), (c).end()
#define pb push_back
#define mp make_pair
#define EXIST(v,i) (find(all(v), i) != (v).end())
#define ERASE(v,i) (v).erase(remove(all(v), i), (v).end())
#define INDEX(v,i) (find(all(v), i) - (v).begin())
#define rep(i,n) for(int i = 0; i < (int)n; ++i)
#define debug(x) cerr << #x << " = " << (x) << endl;

inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

const int INF = 100000000;
const double PI = 3.14159265358979323846;
const double EPS = 1e-10;

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 multi = b / e;
		double x = ((c - f * multi) - (b - e * multi)) / (a - d * multi);
		double y = (c - (a * x)) / b;
		printf("%.3f %.3f\n", x + 0.0, y + 0.0);
	}
	return 0;
}

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

using namespace std;

typedef struct Shiki{
  double a,b,c;//ax+by=c
  double x,y;
};

Shiki Equation (Shiki, Shiki);

main(){
  Shiki shiki1,shiki2;
  vector<Shiki> ans;
  int i=0;
  
  while(cin){

    cin>>shiki1.a>>shiki1.b>>shiki1.c>>shiki2.a>>shiki2.b>>shiki2.c;
    ans.push_back(Equation(shiki1,shiki2));
    i++;
    
  }
  cout<<"hogee"<<endl;
  for(int j=0;j<i;j++){
    cout<< fixed << setprecision(4) << ans[j].x << " " << ans[j].y << endl; 
  }
}

Shiki Equation (Shiki A, Shiki B){
  Shiki ans,preA;
  int x,y,aa,ba;
  
  preA = A;

  aa = A.a;
  ba = B.a;
  
  A.a *= ba;
  A.b *= ba;
  A.c *= ba;
  
  B.a *= aa;
  B.b *= aa;
  B.c *= aa;
  
  ans.a = 0;
  ans.b = A.b - B.b;
  ans.c = A.c - B.c;
  ans.y = ans.c / ans.b;
  ans.x = (preA.c - preA.b*ans.y)/preA.a;
  
  if((int)(ans.y*1000)%10 >= 5)ans.y += 0.0001;
  if((int)(ans.y*1000)%10 >= 5)ans.x += 0.0001;
  
  return ans;
}

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

C++: #include <bits/stdc++.h>
using namespace std;

int main(){
    double a, b, c, d, e, f, 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("%lf %lf\n", x, y);
    }
}

C++: #include<stdio.h>
#include<iostream>
int main(void){
	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/a-b/a*y;
	printf("%.4f %.4f\n",x);
	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;) {
		double bd = b*d;
		double ea = e*a;
		double cd = c*d;
		double fa = f*a;
		y = (cd - fa) / (bd - ea);
		x = (c - b*y) / a;
		printf("%.3f %.3f\n", x, y);
	}
}

C++: #include <cstdio>

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

C++: #include<stdio.h>
int main(void)
{
	int b,a,e,d,f,i,c;
	float y,x;
	while(scanf("%d %d %d %d %d %d",&a,&b,&c,&d,&e,&f)!=EOF)  {
			y=(c*d-a*f)/(b*d-a*e);
			x=(c-(b*y))/a;
		if(x<0.0000 && x>-0.0001){
			x=;
		}
		if(y<0.000&&y>-0.0001){
			y=0;
		}	
		printf("%.3f %.3f\n",x,y);
	}
	return 0;
}

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

double abs(double a){ return a>0 ? a : -a; }

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