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)
		if data[0] == 0 || data[1] == 0 || data[2] == 0 || data[3] == 0 || data[4] == 0 || data[5] == 0 {
			break
		}
		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
}

Python: import sys
from decimal import Decimal
from fractions import Fraction

def main():

    #input_strings = sys.stdin.readlines()
    for matrix_string in input_strings:
        matrix = list(map(Fraction, list(matrix_string.split())))
        if matrix[0] == 0:
            matrix = matrix[3:] + matrix[:3]
        matrix = list(map(lambda x: x / matrix[0], matrix[:3])) + matrix[3:]
        matrix = matrix[:3] + list(map(lambda x: x[1] - matrix[3] * x[0], zip(matrix[:3], matrix[3:])))
        matrix = matrix[:3] + list(map(lambda x: x / matrix[4], matrix[3:]))
        matrix = list(map(lambda x: x[0] - matrix[1] * x[1], zip(matrix[:3], matrix[3:]))) + matrix[3:]
        matrix = list(map(float, matrix))
        matrix = list(map(Decimal, matrix))
        matrix = list(map(lambda x: x.quantize(Decimal('.001'), rounding='ROUND_HALF_UP'), matrix))

        print('%.3f %.3f' % (matrix[2], matrix[5]))
main()

Python: import sys
for line in sys.stdin:
    a, b, c, d, e, f = [float(x) for x in line.split()]
    x = (f * b - e * c) / (d * b - a * e)
    y = (c - a * x) / b
    if abs(x) < 0.00001:
        x = 0.000
    if abs(y) < 0.00001:
        y = 0.000
    print("%.3f %.3f" % (x, y) )

Python: while True:
	try:
		a,b,c,d,e,f=map(int,raw_input().split())
		y=float((c*d-f*a)/(b*d-a*e))
		x=(c-b*y)/a
		print("{:.3f}".format(x)),("{:.3f}".format(y))
	except EOFError:
		break

Python: from sys import stdin

def deal(x):
    if abs(x) < 1e-6: return 0
    else: return x

def solve(a, b, c, d, e, f):
    x = 0
    y = 0
    if b == 0:
        x = c / a
        y = (f - d * x) / e
    else:
        x = (b * f - e * c) / (b * d - e * a)
        y = (c - a * x) / b
    
    p = [deal(x), deal(y)]
    return p

for s in stdin:
    s = s[:-1]
    s = map(float, s.split())
    p = solve(s[0], s[1], s[2], s[3], s[4], s[5])
    print ("%.3f "%p[0] + "%.3f"%p[1])

Python: while True:
    try:
        a, b, c, d, e, f = map(int, raw_input().split()) 
        x = float(c*e - b*f)/(a*e - b*d)
        y = float(c*d - a*f)/(b*d - a*e)
        print ("%f %f" % (round(x,-3), round(y),-3))
    except:
        break

Python: import sys
line = input()
for _ in range(1):
    a, b, c, d, e, f = map(float, line.split())
    x = round((c * e - b * f) / (a * e - b * d), 3)
    y = round((a * f - c * d) / (a * e - b * d), 3)
    print('{0:.3f} {1:.3f}'.format(x, y))

Python: while True:
    try:
        L=list(map(int,input().split()))
        x=L[0]*L[4]-L[3]*L[1]
        y=L[2]*L[4]-L[5]*L[1]
        z=y/x+0
        w=(L[2]-L[0]*z)/L[1]+0
        print(f"{z:.3f} {w:.3f}")
    except EOFError:
        break

Python: # -*- coding: utf-8 -*-

import sys
import os


for s in sys.stdin:
    a, b, c, d, e, f = list(map(int, s.split()))

    delta = a * e - b * d
    if delta == 0:
        break
    else:
        x = 1 / delta * (e * c - b * f)
        y = 1 / delta * (-d * c + a * f)
        print('{:.3f} {:.3f}'.format(x, y))

Python: a, b, c, d, e, f = map(float, raw_input().split())

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

print ("{0:.4f} {1:.4f}".format(x, y))

Python: import sys

ary=[]
ans=[]
def solve(a,b,c,d,e,f):
    x=(c-b*f/e)/(a-b*d/e)
    y=(c-a*f/d)/(b-a*e/d)
    return [x,y]

for i in sys.stdin:
    ary.append(list(map(int,i.split())))
    ans.append(solve(*ary[-1]))
    
for i in range(len(ans)):
    print('{0:.4f} {1:.4f}' .format(*ans[i]))

Python: def jisuan(lis):
    ns = lis.split(" ")
    for i in range(6):
        ns[i] = float(ns[i])
    a, b, c, d, e, f = ns[0], ns[1], ns[2], ns[3], ns[4], ns[5]
    x = (c * e - b * f) / (a * e - b * d)
    y = (c * d - a * f) / (b * d - a * e)
    return [x, y]


inpu = str(input())
nums = inpu.split("\n")
for l in range(len(nums)):
    k0 = jisuan("1 2 3 4 5 6")[0]
    k1 = jisuan("1 2 3 4 5 6")[1]
    print("%.3f" % k0, "%.3f" % k1)

Python: # Vol0004.
import sys

def main():
    data = []
    lines = sys.stdin.readlines()

    for line in lines:
        data.append(line.split())  # スペース区切りで放り込む
    # ax + by = c, dx + ey = fの解は、
    # x = (ce - bf) / (ae - bd), y = (af - cd) / (ae - bd).
    # これをround(float, 3)すれば答えが出る。
    N = len(data)
    for i in range(N):
        for k in range(6):
            data[i][k] = int(data[i][k])
        det = data[i][0] * data[i][4] - data[i][1] * data[i][3]
        gx = data[i][2] * data[i][4] - data[i][1] * data[i][5]
        gy = data[i][0] * data[i][5] - data[i][2] * data[i][3]
        if det < 0:
            det = -det;
            if gx != 0: gx = -gx
            if gy != 0: gy = -gy
        print("{0:.3f}".format(gx / det) + " " + "{0:.3f}".format(gy / det))

if __name__ == "__main__":
    main()

# 補足、0.1とか0.22でも3桁目まで表示しないとWrongになる。
# 表示するにはprint("{0:.nf}".format(数))ってやる(nのところは桁数)。
# さらに、0を負の数で割ると表示が-0.000になってしまうのでそこの処理も重要。

Python: while True:
	try:
		a,b,c,d,e,f = map(float, input().split())
		z = a*e - b*d
		if z != 0:
			y = (a*f - c*d) / z
			x = (c*e - b*f) / z
			print("{:.3f} {:.3f}".format(x+0,y+0))
	except:
		break

Python: while 1:
    try:
        a,b,c,d,e,f=map(int,input().split())
        x=(c*d-a*f)/(b*d-a*e)
        print("{:.3f} {:.3f}".format((c-b*x)/a,x))
    except:break

Python: import numpy as np

while True:
  try:
    a,b,c,d,e,f = list(map(int,input().split()))

    ume = np.array([a,b,d,e]).reshape(2,2)
    boshi = np.array([c,f]).reshape(2,1)

    answer = np.linalg.inv(ume) @ boshi
    print("%.3f %.3f" % (answer[0,0],answer[1,0]))

  except ValueError:
    break

Python: import itertools
import operator

dataset = []
while True:
    try:
        dataset.append(input())
    except EOFError:
        break

for item in dataset:
    try:
        a, b, c, d, e, f = [int(i) for i in item.split()]
        e = e * (a/d)
        f = f * (a/d)

        y = (c - f)/(b-e)
        x = (c - b*y) / a 
        print("{:.3f} {:.3f}".format(x, y))

    except:
        print("dataset cannot to be converted")

Python: while True:
    try:
        a, b, c, d, e, f = map(int, raw_input().split()) 
        x = float(c*e - b*f)/(a*e - b*d)
        y = float(c*d - a*f)/(b*d - a*e)
        print ("%f %f" % (round(x,-3), round(y,-3)))
    except:
        break

Python: try:
    while True:
        a,b,c,d,e,f=map(int, input().split())
        print( "{0:.3f}".format(round((c*e-b*f)/(a*e-b*d),3)), "{0:.3f}".format(round((a*f-c*d)/(a*e-b*d),3)) )
except EOFError:
    pass

Python: #連立方程式
import numpy as np

def function(a,b,c,d,e,f):
    A = np.matrix([
    [a, b],
    [d, e]
    ])
    Y = np.matrix([
    [c],
    [f]
    ])
    result = np.linalg.inv(A)*Y
    print('{:.3f}'.format(float(result[0])), '{:.3f}'.format(float(result[1])))

while True:
    try:
        a,b,c,d,e,f = list(map(int,input().split()))
        a,b,c,d,e,f = int(a),int(b),int(c),int (d),int(e),int(f)
        function(a,b,c,d,e,f)
    except EOFError:
        break