Go: package main

import (
  "fmt"
)

func main() {
  var a,b,c,d,e,f float64
  var x,y float64
  for _, err := fmt.Scan(&a, &b, &c, &d, &e, &f); err == nil;
   _, err = fmt.Scan(&a, &b, &c, &d, &e, &f) {
    y = (a*f-c*d)/(a*e-b*d)
    x = (c-b*y)/a
    fmt.Printf("%.3f %.3f\n", x,y)
  }
}

C++: #include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;
int main() {
  int a, b, c, d, e, f;
  double 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("%.3f %.3f\n", x, y);
  }
  return 0;
}

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

int main(){
    float a,b,c,d,e,f,x;
    while(cin>>a>>b>>c>>d>>e>>f){
        x=a*e-b*d;
        printf("%.3f %.3f\n",(c*e-b*f)/x,(a*f-c*d)/x);
    }
}

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

double myRound(double x){
  int y = (int)round(x * 1000);
  return y / 1000.0;
}

int main(){
  double a, b, p, c, d, q;

  while(cin >> a >> b >> p >> c >> d >> q){
    double tmp = a * d - b * c;
    double x = (d * p - b * q) / tmp;
    double y = (a * q - c * p) / tmp;

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

C++: /*
	ax+by=c,
	 dx+ey=f
	x=(E1*B2-B1*E2)/(A1*B2-B1*A2)
	y=(E2*A1-E1*A2)/(A1*B2-A2*B1)
*/

#include<iostream>
#include <iomanip>
#include<math.h>
#include<list>
#include<string>
#define round(d, n)	 (double((d) * pow(10, n) + 0.5) / pow(10, n))
using namespace std;

int main(){
	double a,b,c,d,e,f;
	double x, y;
	list<double> xy;
	
	while(!(cin>>a>>b>>c>>d>>e>>f).eof()){
		xy.push_back((c*e-f*b)/(a*e-b*d));
		xy.push_back((f*a-d*c)/(a*e-d*b));
	}
	list<double>::iterator it = xy.begin();
	while(it != xy.end()){
		x = *it;
		it++;
		y = *it;
		cout << fixed << setprecision(3) << round(x,4) << " " << round(y,4) << endl;
		it++;
	}
}

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

int main(){
	double a11,a12,c,a21,a22,f;
	while(cin>>a11>>a12>>c>>a21>>a22>>f){
		double x,y,delta=((double)a11*a22-(double)a12*a21);
		x=((double)a22*c-(double)a12*f)/delta;
		y=((double)a11*f-(double)c*a21)/delta;
		if(x>0){x=(double)(((int)((x*1000)+0.5))/1000);
		}else if(x<0){x=(double)(((int)((x*1000)-0.5))/1000);}else{x=0;}
		if(y>0){y=(double)(((int)((y*1000)+0.5))/1000);
		}else if(y<0){y=(double)(((int)((y*1000)-0.5))/1000);}else{y=0;}
		cout<<fixed<<setprecision(3)<<x<<" "<<y<<endl;
	}
	return 0;
}

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

C++: #include <stdio.h>

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

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

using namespace std;

int main()
{
	double A, B, C, D, E, F, X, Y, G , H;

	while(cin >> A >> B >> C >> D >> E >> F)
	{
		X=(double)(C*E-F*B)/(A*E-D*B);
		Y=(double)(A*F-D*C)/(A*E-D*B);

		printf("%.3f %.3f\n",X,Y);
	}
}

C++: #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
#define FOR(i,x,n) for(int i=x; i<(n); i++)
#define ALL(n) begin(n),end(n)
#define MOD (1000000007)
#define INF (1e9)
#define INFL (1e18)
 
typedef long long ll;
typedef unsigned int ui;
typedef unsigned long long ull;
template<class T>using arr=vector<vector<T>>;
template<class T>void pr(T x){cout << x << endl;}
template<class T>void prvec(vector<T>& a){rep(i, a.size()-1){cout << a[i] << " ";} cout << a[a.size()-1] << endl;}
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }
 
int main()
{
    double a, b, c, d, e, f;
    while(cin >> a >> b >> c >> d >> e >> f){
        double x = (c*e - b*f)/(a*e - b*d);
        double y = (-c*d + a*f)/(a*e - b*d);
        int xi = (int)1000*x;
        int yi = (int)1000*y;
        printf("%.3f %.3f\n", xi/1000.0, yi/1000.0);
    }
    return 0;}

C++: //#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS
#include <cstdio>
//#include <cstdlib>
#include <cmath>
#include <iostream>
#include <algorithm>
//#include <cstring>
#include <vector>
#include <string>
#include <map>
#include <list>
#include <queue>
#include <set>
using namespace std;

int main(void){

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

	return 0;
}

/*
for(i=0;i<N;i++){
	cin >> X[i];
}


for(i=0;i<N;i++){
	for(j=0;j<N;j++){
		cin >> X[i][j];
	}
}
*/

C++: /*
    ????????°??§???????????¨????????????
*/

#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <limits.h>
#include <iostream>
#include <algorithm>
#include <string>
#include <iterator>
#include <vector>
#include <map>
#include <utility>
#define LLU unsigned long long int
#define LL long long int
#define LD long double
using namespace std;
#define LLUmax ULLONG_MAX
#define LLmax LLONG_MAX
#define dmax INT_MAX
#define vd vector<int>
#define vLL vector<long long int>
#define vLLU vector<unsigned long long int> 
#define pb push_back
#define mp make_pair
#define fi first
#define sec second
#define debug printf("asd\n")
#define debugd(a) printf("--%d\n",a)
#define debugdd(a,b) printf("--%d %d\n",a,b)
#define debugarr(a,b) for(int i=0 ; i<b ; i++)printf("%d ",a[i]);printf("\n")
#define newline printf("\n")
#define forin(a,b,c) for(int a=b ; a<c ; a++)
#define forde(a,b,c) for(int a=b ; a<c ; a--)


inline void scd(int &a){scanf("%d",&a);}
inline void scdd(int &a,int &b){scanf("%d %d",&a,&b);}
inline void sctd(int &a,int &b,int &c){scanf("%d %d %d",&a,&b,&c);}
inline void scdlld(long int &a,long int &b){scanf("%I64d %I64d",&a,&b);}
inline void sclld(long long int &a){scanf("%I64d",&a);}

#define scarrd(a,b) for(int index=0 ; index<b ; index++)scanf("%d",&a[index])
#define prdlld(a,b) printf("%I64d %I64d",a,b)
#define prdd(a,b) printf("%d %d",a,b)
#define prd(a) printf("%d",a)
#define prarr(a,b) for(int i=0 ; i<b ; i++)printf("%d ",a[i])
#define iniarr(a,b) for(int i=0 ; i<b ;i++)a[i]=0
#define arr(a,b) int *a=(int *)malloc(b*sizeof(int))
#define llarr(a,b) long long int *a=(long long int *)malloc(b*sizeof(long long int))
#define st(a,b) char *a=(char *)malloc(b*sizeof(char))
#define grav 9.8
#define pi 3.14159265

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

C++: #include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<ll> VL;
typedef vector<VL> VVL;
typedef pair<int, int> PII;

#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(x) x.begin(), x.end()
#define MOD 1000000007
#define INF (1LL<<25)     //33554432
#define PI 3.14159265359
#define EPS 1e-12
//#define int ll

signed main(void)
{
  double 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) << " " << (c*d-a*f)/(b*d-a*e) << endl;
  }

  return 0;
}