Go: package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	var strs []string
	var a, b, c, d, e, f float64
	var x, y float64
	for scanner.Scan() {
		strs = strings.Split(scanner.Text(), " ")
		_a, _ := strconv.Atoi(strs[0])
		_b, _ := strconv.Atoi(strs[1])
		_c, _ := strconv.Atoi(strs[2])
		_d, _ := strconv.Atoi(strs[3])
		_e, _ := strconv.Atoi(strs[4])
		_f, _ := strconv.Atoi(strs[5])
		a = float64(_a)
		b = float64(_b)
		c = float64(_c)
		d = float64(_d)
		e = float64(_e)
		f = float64(_f)
		y = (c*d - f*a) / (d*b - a*e)
		x = (c - b*y) / a

		fmt.Printf("%.3f %.3f\n", x, y)
	}
}

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

using db = double;

int main() {
	cout << fixed << setprecision(3);
	ios :: sync_with_stdio(false);
	db a, b, c, d, e, f;
	while(cin >> a >> b >> c >> d >> e >> f) {
		db x = (c * e - b * f) / (a * e - b * d);
		db y = (a * f - c * d) / (a * e - b * d);
		cout << x << ' ' << y << '\n';
	}
	return 0;
}

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

C++: use std::io::{stdin, BufRead, BufReader};

fn main(){
    let input = BufReader::new(stdin());

    for line in input.lines(){
        
        let v: Vec<f32> = line.unwrap().split_whitespace().filter_map(|x| x.parse::<f32>().ok()).collect();
        
        println!("{:.3} {:.3}", (v[2]*v[4]-v[1]*v[5])/(v[0]*v[4]-v[1]*v[3]),(v[2]*v[3]-v[0]*v[5])/(v[1]*v[3]-v[0]*v[4]));
    }
}
    

// --- template ---
#[allow(unused_imports)]
use std::cmp::{max, min};
#[allow(unused_imports)]
 
pub trait FromLn {
    fn fromln(s: &str) -> Self;
}
pub fn readln<T: FromLn>() -> T {
    let mut buf = String::new();
    let _ = ::std::io::stdin().read_line(&mut buf).unwrap();
    T::fromln(buf.trim())
}
pub fn readlns<T: FromLn>(n: usize) -> Vec<T> {
    let mut vs = vec![];
    for _ in 0..n {
        vs.push(readln());
    }
    vs
}
macro_rules! fromln_primitives {
    ($($t:ty),*) => { $(
        impl FromLn for $t {
            fn fromln(s: &str) -> $t {
                s.parse().unwrap()
            }
        }
    )* }
}
fromln_primitives!(
    String,
    bool,
    f32,
    f64,
    isize,
    i8,
    i16,
    i32,
    i64,
    usize,
    u8,
    u16,
    u32,
    u64
);
impl<T> FromLn for Vec<T>
where
    T: FromLn,
{
    fn fromln(s: &str) -> Vec<T> {
        s.split_whitespace().map(T::fromln).collect()
    }
}
impl FromLn for Vec<char> {
    fn fromln(s: &str) -> Vec<char> {
        s.chars().collect()
    }
}
macro_rules! fromln_tuple {
    ($($t:ident),*) => {
        impl<$($t),*> FromLn for ($($t),*) where $($t: FromLn),* {
            fn fromln(s: &str) -> ($($t),*) {
                let mut it = s.split_whitespace();
                let t = ($($t::fromln(it.next().unwrap())),*);
                assert_eq!(it.next(), None);
                t
            }
        }
    }
}
fromln_tuple!(A, B);
fromln_tuple!(A, B, C);
fromln_tuple!(A, B, C, D);
fromln_tuple!(A, B, C, D, E);
fromln_tuple!(A, B, C, D, E, F);

C++: #include <iostream>
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-f*b)/(a*e-d*b);
		y = (a*f-d*c)/(a*e-d*b);
		printf("%.3f %.3f\n",x,y);
	}
}

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

using namespace std;

static vector<double> solve_simultaneous(const vector<double> &set) {
	vector<double> result(2, 0);
	result.at(0) = ( ((set.at(2)/set.at(1)) - (set.at(5)/set.at(4)))
		/((set.at(0)/set.at(1)) - (set.at(3)/set.at(4))) );

	result.at(1) = ( ((set.at(2)/set.at(0)) - (set.at(5)/set.at(3)))
		/((set.at(1)/set.at(0)) - (set.at(4)/set.at(3))) );

	return result;
}

int main(void) {
	int dataset_counter = 0;
	double check_input = 0;
	vector<vector<double> > input;

	while (cin >> check_input) {
		input.push_back(vector<double>(6));
		input.at(dataset_counter).at(0) = check_input;
		for (int i = 1; i < 6; i ++) {
			double temp;
			cin >> input.at(dataset_counter).at(i);
		}

		dataset_counter ++;
	}

	for (vector<double> dataset : input) {
		vector<double> result(2, 0);
		result = solve_simultaneous(dataset);

		cout << fixed;
		cout << setprecision(3) << result.at(0) << " "
		<< setprecision(3) << result.at(1) << endl;
	}

	return 0;
}

C++: #include<iostream>
#include<iomanip>
#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 - (b / e)*f) / (a - (b / e)*d);
		y = (c - a*x) / b;

		cout << fixed << setprecision(3) << x << " " << y << endl;
	}

	return 0;
}

C++: #include <algorithm>
#include <vector>
#include <math.h>
#include <stdio.h>
#include <cctype>
#include <iostream>
#include <set>
#include <string>
#include <queue>
#include <map>
using namespace std;
int size(string x){
	string::size_type size=x.size();
	return size;
}
#define fu(l,k) for(int i=l;i<k;i++)
#define fd(l,k) for(int i=l;i>k;i--)
#define fi first
#define se second
typedef  vector<string> vs;
typedef  vector<int> vi;
double pi(){
	return M_PI;
}
typedef set<int> set_i;
typedef set<string> set_s;
int main(){
	double a,b,c,d,e,f,a1;
	while(cin>>a>>b>>c>>d>>e>>f){
		double x,y,x1,y1;
		a1=a;
		a=a*d;
		b=b*d;
		c=c*d;
		d=d*a1;
		e=e*a1;
		f=f*a1;
		y=(c-f)/(b-e);
		x=(f-e*y)/d;
		if(x<0.001&&x>=0) x=0;
		if(y<0.001&&y>=0) y=0;
		if(x<-0.001) x=0;
		if(y<-0.001) y=0;
		printf("%.3lf %.3lf\n",x,y);
	}
}

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

using namespace std;

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 - a*x) / b;

		x = ( (double)( (int)(x * 1000) ) ) / 1000;
		y = ( (double)( (int)(y * 1000) ) ) / 1000;

		cout << setiosflags(ios::fixed) << setprecision(3);
		cout << x << " " << y << endl;
	}
	return 0;
}

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


/*
//my header
#include "define.h"
#include "geometry.h"*/


void init()
{
#ifdef _WIN32
	freopen("1.txt", "r", stdin);
#endif
}

void func();

int main()
{
	init();
	func();

	return 0;
}


void func()
{
	double a,b,c,d,e,f;
	while(~scanf("%lf%lf%lf%lf%lf%lf", &a, &b, &c, &d, &e, &f))
	{
		double x = (c*e-f*b)/(a*e - b*d);
		double y = (c*d-a*f)/(b*d - a*e);
		printf("%.3lf %.3lf\n", x, y);
	}
}

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

using namespace std;
int main(){
    double a,b,c,d,e,f;

    while (!cin.eof()){
        cin>>a>>b>>c>>d>>e>>f;
        double D=a*e-b*d;
        double X=(c*e-f*b)/D,Y=(a*f-d*c)/D;
        if (X==-0.0) X=0.0;
        if (Y==-0.0) Y=0.0;
        printf("%.3lf %.3lf\n",X,Y);

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

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int main(){
    double a,b,c,d,p,q;
    while(cin>>a>>b>>p>>c>>d>>q){
        double x=(b*q-d*p)/(b*c-a*d);
        double y=(a*q-c*p)/(a*d-b*c);
        if(x<=0.0&&x>-0.00001)x=0.0;
        if(y<=0.0&&y>-0.00001)y=0.0;
        printf("%.3f %.3f\n",x,y);
    }

    return 0;
}