Go: package main

import "fmt"

func main() {
	var Xs, Ys []float32
	Xs = make([]float32, 0)
	Ys = make([]float32, 0)
	var cnt int
	for {
		var a, b, c, d, e, f, x, y float32
		fmt.Scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f)
		if a == 0 {
			break
		}
		y = (((a * f) - (d * c)) / ((a * e) - (b * d)))
		x = ((c - (b * y)) / a)
		Xs = append(Xs, x)
		Ys = append(Ys, y)
		cnt++
	}
	for i := 0; i < cnt; i++ {
		fmt.Printf("%.3f %.3f\n", Xs[i], Ys[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: while True:
    try:
        (a, b, e, c, d, f) = map(float, input().split())

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

        if D == 0:
            x = 0.0
            y = 0.0

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

    except EOFError:
        break

Python: import sys

#inputNum = sys.stdin.readlines()[:-1]
inputNum = open('sample.txt', 'r')

for i in inputNum:
    new = []
    n = i[:-1].split(' ', 6)
    for s in n:
        new.append(float(s))
    k = new[0]
    q = 0
    for a in new[0:3]:
        new[q] = a/k
        q = q + 1
    l = new[3]
    for a in new[3:6]:
        new[q] = a - l*new[q-3]
        q = q + 1
    if new[4] == 0:
        y = new[5]
    else:
        y = new[5]/new[4]
    x = new[2]-(new[1]*y)
    print("{0:.3f}".format(x),"{0:.3f}".format(y))

Python: import sys

nums = []


for line in sys.stdin:
    nums.append(line)

for i in range(len(nums)):
    input_line = nums[i].split(" ")
    a = float(input_line[0])
    b = float(input_line[1])
    c = float(input_line[2])
    d = float(input_line[3])
    e = float(input_line[4])
    f = float(input_line[5])

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

    
    print("{:.3f} {:.3f}".format(x+0,y+0))

Python: from __future__ import division
while True:
	try:
		a, b, c, d, e, f = map(int, raw_input().split())
		D = a*e - b*d
		Dx = c*e - b*f
		Dy = a*f - c*d
		print("%.3f %.3f" % (Dx/D + 0, Dy/D + 0))
	except EOFError:
		break

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

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

Python: import sys
lines = sys.stdin.readlines()

for line in lines:
    s = str(line)
    a,b,c,d,e,f = map(int, s.rstrip('\n').split())
    x = (e*c - b*f) / (a*e - b*d)
    if e*c - b*f == 0:
        x = 0
    x = round(x, 3)
    y = (a*f - c*d) / (a*e - b*d)
    if a*f - c*d == 0:
        y = 0
    y = round(y, 3)
    print(f'{x:.3f} {y:.3f}')

Python: import sys

inputNum = sys.stdin.readlines()[:-1]

for i in inputNum:
    new = []
    n = i[:-1].split(' ', 6)
    for s in n:
        new.append(float(s))
    k = new[0]
    q = 0
    for a in new[0:3]:
        new[q] = a/k
        q = q + 1
    l = new[3]
    for a in new[3:6]:
        new[q] = a - l*new[q-3]
        q = q + 1
    if new[4] == 0:
        y = new[5]
    else:
        y = new[5]/new[4]
    x = new[2]-(new[1]*y)
    print("{0:.3f}".format(x)+" "+"{0:.3f}".format(y))

Python: from __future__ import division
while True:
	try:
		a, b, c, d, e, f = map(int, raw_input().split())
		D = a*e - b*d
		Dx = c*e - b*f
		Dy = a*f - c*d
		print("%.3f %.3f" % (Dx/D, Dy/D))
	except EOFError:
		break

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:
		n=list(map(float, input().split()))#ファイルの読み込み --.py <--.txt
	except EOFError:
		break
	y=(n[3]*n[2]-n[0]*n[5])/(n[1]*n[3]-n[0]*n[4])
	x=(n[2]-n[1]*y)/n[0]
	print('{:.3f}'.format(x), '{:.3f}'.format(y))#format関数を用いて桁を指定

Python: import numpy as np

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

Python: import sys

for line in sys.stdin:
    array = [float(x) for x in line.split()]
    ar1 = array[0:3]
    ar2 = array[3:]
    i = ar1[0]
    ar1 = [x*ar2[0] for x in ar1]
    ar2 = [x*i for x in ar2]
    y = (ar1[2] - ar2[2])/(ar1[1]-ar2[1])
    ar1 = array[0:3]
    x = (ar1[2]-ar1[1]*y)/ar1[0]
    if (x - int(x)) == 0 and (y - int(y)) == 0:
        print(str(round(x,3)) + '00 ' +  str(round(y,3)) + '00')
    elif (x - int(x)) == 0:
        print(str(round(x,3)) + '00 ' +  str(round(y,3)))
    elif (x - int(x)) == 0 and (y - int(y)) == 0:
        print(str(round(x,3)) + ' ' +  str(round(y,3)) + '00')
    else:
        print(str(round(x,3)) + ' ' +  str(round(y,3)))

Python: import sys
from decimal import Decimal

def main():

    #input_strings = sys.stdin.readlines()
    for coef_and_cons in input_strings:
        a, b, c, d ,e, f = map(Decimal, coef_and_cons.split())
        x = (f/e - c/b) / (d/e - a/b)
        y = (f/d - c/a) / (e/d - b/a)
        print('%.3f %.3f' %  (x.quantize(Decimal('0.001'), rounding='ROUND_HALF_DOWN'),
                              y.quantize(Decimal('0.001'), rounding='ROUND_HALF_DOWN') )
             )


main()

Python: import numpy as np
while True:
    try:
        a,b,c,d,e,f = map(int, input().split())
        x,y=map(float,np.dot(np.linalg.inv(np.array([a,b,d,e]).reshape(2,2)),np.array([c,f])))
        print('%.3lf %.3lf' % (x,y))
    except:
        break

Python: while True:
  try:
    a, b, c, d, e, f = map(int, input().split(" "))
    
    det = a * d - b * c
    x = det * (d * e - b * f)
    y = det * ((-c) * e + a * e)

    print(str(x), str(y))

  except:
    break

Python: import fileinput

if __name__ == "__main__":
    for line in fileinput.input():
        v = [int(i) for i in line.split(" ")]
        x = (v[2] * v[4] - v[1] * v[5]) / (v[0] * v[4] - v[1] * v[3])
        y = (v[2] * v[3] - v[0] * v[5]) / (v[1] * v[3] - v[0] * v[4])
        print(format(x, ".3f"), format(y, ".3f"))

Python: t = 0
while t == 0:	
	try:
		a,b,e,c,d,f = [int(i) for i in input().split()]
	except:
		break
	else:
		x = (d*e - b*f) / (a*d - b*c) + 0
		y = (a*f - c*e) / (a*d - b*c) + 0
		print("{0:.3f}".format(x) + "  " + "{0:.3f}".format(y))

Python: while True:
    try:
        a, b, c, d, e, f = map(float, input().split())
    except:
        break
    
    if b==0:
        x = c/a
        y = (f-d*x)/e
    
    elif e==0:
        x = f/d
        y = (c-a*x)/b
    
    else:
        x = (b*f-c*e)/(b*d-a*e)
        y = c/b - a*x/b
    
    if x==0:
        print(f'{abs(x):.3f} {y:.3f}')
    elif y==0:
        print(f'{x:.3f} {abs(y):.3f}')
    else:
        print(f'{x:.3f} {y:.3f}')