Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Split(bufio.ScanWords)
	for {
		data := nextInts(6)
		fmt.Printf("%.3f\n", Round(GetX(data[0], data[1], data[2], data[3], data[4], data[5]), 3))
		fmt.Printf("%.3f\n", Round(GetY(data[0], data[1], data[2], data[3], data[4], data[5]), 3))
	}
}

func GetX(a, b, c, d, e, f float64) float64 {
	return ((c * e) - (b * f)) / ((a * e) - (b * d))
}

func GetY(a, b, c, d, e, f float64) float64 {
	return ((c * d) - (a * f)) / ((b * d) - (a * e))
}

func Round(f float64, places int) float64 {
	shift := math.Pow(10, float64(places))
	return math.Floor(f*shift+.5) / shift
}

func next() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() float64 {
	a, _ := strconv.Atoi(next())
	return float64(a)
}

func nextInts(n int) []float64 {
	a := make([]float64, n)
	for i := 0; i < n; i++ {
		a[i] = nextInt()
	}
	return a
}

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

int main(){
  int i = 0;
  while(1){
  i++;
  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);
  
  if(scanf()==EOF) break;
  else{
    int line = i * 6
    fseek(STDIN, lineL, SEEK_SET);
  }
  }
  
  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;
    }
    cout << x <<" "<< y << endl;
  }

  return 0;
}

C++: #include<iostream>
#include<iomanip>
using namespace std;
int main(){
  double a,b,c,d,e,f,x,y,hy,dk;
  while(cin>>a>>b>>c>>d>>e>>f){
    a *= d;
    b *= d;
    c *= d;//方程式にd倍
    dk = d;
    d *= (a/dk);
    e *= (a/dk);
    f *= (a/dk);//方程式にa倍
    y = (c-f)/(b-e);
    a /= d;
    b /= d;
    c /= d;//元の方程式
    hy = y * b;
    x = (c-hy)/a;
    /*if(x>0) x += 0.0005;
    else if(x<0)x -= 0.0005;
    if(y>0) y += 0.0005;
    else if(y<0)y -= 0.0005;*/
    cout << fixed << setprecision(3) << x << ' ' << y << endl;
  }
  return 0;
}

C++: #include<iostream>
#include<iomanip>
using namespace std;
int main(){
	int a,b,c,d,e,f,two,three;
	while (cin >> a >> b >> c >> d >> e >> f){
		two = b*d-e*a;
		three = c*d - f*a;
		std::cout << std::setprecision(4) << c - b*three / two << " " << three / two << endl;
	}
	return 0;
}

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

int main() {
	int a, b, c, d, e, f;
	int cnt = 0;
	bool flg = true;
	std::vector<double> x_vector;
	std::vector<double> y_vector;

#if 0
	while (cnt < 2) {
		cin >> a >> b >> c >> d >> e >> f;
#else
	while (cin >> a >> b >> c >> d >> e >> f) {
#endif
		double x = (b * f - c * e) / (b * d - a * e);
		double y = (c * d - a * f) / (b * d - a * e);

		cnt++;
		x_vector.push_back(x);
		y_vector.push_back(y);
	}

	for (unsigned int i = 0; i < cnt; i++) {
		std::cout << std::fixed;
		std::cout << std::setprecision(3) << x_vector[i] << " ";
		std::cout << std::setprecision(3) << y_vector[i] << endl;
	}

	//???????????°
	//while (1);

	return 0;
}

C++: #include<iostream>
#include<stdio.h>
using namespace std;
 
int main()
{
    double a,b,c,d,e,f;
    while(cin>>a>>b>>c>>d>>e>>f){
        printf("%.3f ",(c-b*(f-d*c/a)/(e-d*b/a))/a);
        printf("%.3f\n",(f-d*c/a)/(e-d*b/a));
    }
    return 0;
}

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

C++: #include<cstdio>
#include<string>
#include<iostream>
#include<algorithm>
#define _USE_MATH_DEFINES
#include<math.h>
#include<queue>
#include<set>
#include<vector>
#define INF 100000000

#define MAX_N 100
#define MAX_set 200

typedef long long int ll;
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 = (e*c-b*f)/(e*a-b*d);
	
		printf("%.3f %.3f\n", x, (c-a*x)/b);
	
	
	
	}

}

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

int main(){
	
	double a, b, c, d, e, f, x=0, y=0; // ???????°???°?????°??? %f
	while(cin >> a >> b >> c >> d >> e >> f){
		x = (double)( (b*f-c*e)/(b*d-a*e) );
		y = (double)( (a*f-c*d)/(a*e-b*d) );

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

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



int main(){
  double a,b,c,d,e,f;
  while(cin >> a >> b >> c >> d >> e >> f)
    cout << double( (c*e-f*b)/(a*e-b*d))<< ' ' << double((a*f-c*d)  /(a*e-b*d)) <<endl;

}

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

int main(){
	double a[6];
	double x,y;
	while(true){
		cin >> a[0];
		cin >> a[1];
		cin >> a[2];
		cin >> a[3];
		cin >> a[4];
		cin >> a[5];
		if(cin.eof())
			break;
			
		x = (a[4]*a[2]-a[1]*a[5])/(a[0]*a[4]-a[1]*a[3]);
		y = (-a[3]*a[2]+a[0]*a[5])/(a[0]*a[4]-a[1]*a[3]);
		
		cout << setprecision(3) << x << " " <<setprecision(3) << y << endl;
	}
	return 0;
}

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

int main(void) {
  string input;
  string output;
  vector<string> v;
  float a, b, c, d, e, f;
  while (scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f)+1)  {
    float x = (c*e-b*f)/(a*e-b*d);
    float y = (c*d-a*f)/(b*d-a*e);
    if (x < -1.0e-4) x = 0.0;
    if (y < -1.0e-4) y = 0.0;
    printf("%.3f %.3f\n", x, y);
  }
  return 0;
}

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

float det(float a[2][2]){
	return a[0][0]*a[1][1]-a[0][1]*a[1][0];
}
float detx(float a[2][2],float p,float q){
	return p*a[1][1]-a[0][1]*q;
}
float dety(float a[2][2],float p,float q){
	return a[0][0]*q-p*a[1][0];
}

int main(){
	float a[2][2];
	float p,q;

	while(cin>>a[0][0]>>a[0][1]>>p>>a[1][0]>>a[1][1]>>q){
		float d1;
		float x,y;
		d1=det(a);
		x=detx(a,p,q)/d1;
		if(x==-0) x=0;
		y=dety(a,p,q)/d1;
		if(y==-0) y=0;
		cout.precision(3);
		cout.setf(ios::fixed);
		cout<<x<<" "<<y<<"\n";
	}
	return 0;
}

C++: #include <stdio.h>

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

C++: #include<iostream>
#include<algorithm>
#include<stdio.h>
using namespace std;
int main(){
	long a,b,c,d,e,f;
	long o,p,q,r,s,t;
	double x,y;
	while(scanf("%ld%ld%ld%ld%ld%ld",&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.0;
		}
		else{
		y=(float)(q/p);
		}
		int g=(int)(e*y);
		g*=-1;
		if(f+g==0){
			x=0.0;
		}
		else{
			x=(float)((f+g)/d);
		}
		printf("%.3lf %.3lf\n",x,y);
	}
}

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

int main() {
	// your code goes here

  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(y == 0){
      y = 0;
    }


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

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