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: # coding: utf-8

while True:
	data = map(int, raw_input().split())
	a = data[0]
	b = data[1]
	c = data[2]
	d = data[3]
	e = data[4]
	f = data[5]

	x = (c*e-b*f)*1.0 / (a*e-b*d)
	if x == -0.000:
		x = 0.000
	if b != 0:
		y = (c-a*x)/b
	else:
		y = (f-d*x)/e
	if y == -0.000:
		y = 0.000

	print("{:.3f} {:.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: while True:
	try:
		a,b,c,d,e,f = map(int, input().split())
		x = (c*d-a*f)/(b*d-a*e)
		print("{:.3f} {:.3f}".format(x,c-b*x/a))
	except:
		break

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

Python: import sys
[print("{0[0]:.3f} {0[1]:.3f}".format([round(y, 3) for y in [(x[4] * x[2] - x[1] * x[5]) / (x[0] * x[4] - x[1] * x[3]), (x[0] * x[5] - x[2] * x[3]) / (x[0] * x[4] - x[1] * x[3])]])) for x in [[float(y) for y in x.split()] for x in sys.stdin]]

Python: import sys

ary=[]
ans=[]
def solve(a,b,c,d,e,f):
    x=round((c*e-b*f)/(a*e-b*d),3)
    y=round((c*d-a*f)/(b*d-a*e),3)
    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:.3f} {1:.3f}'.format(*ans[i]))

Python: import sys
strs = sys.stdin.readlines()
for s in strs:
    a, b, c, d, e, f = map(int, s.split())
    print('{:.3f} {:.3f}'.format((c*e - b*f) / (a*e - b*d), (a*f - c*d) / (a*e - b*d)))

Python: import sys
from decimal import Decimal

def main():
    for input_line in sys.stdin:
        input_line = raw_input()
        x1 = int(input_line.split(' ')[0])
        y1 = int(input_line.split(' ')[1])
        p = int(input_line.split(' ')[2])
        x2 = int(input_line.split(' ')[3])
        y2 = int(input_line.split(' ')[4])
        q = int(input_line.split(' ')[5])
        multiplicand1, multiplicand2 = calculate1(x1, x2)
        after_y1, after_y2, after_p, after_q = calculate2(y1, y2, p, q, multiplicand1, multiplicand2)
        calculate3(after_y1, after_y2, after_p, after_q, x1, y1, p)
    
def calculate1(x1, x2):
    if (x1 >= 0 and x2 >= 0) or (x1 < 0 and x2 < 0):
        multiplicand1 = -x2
        multiplicand2 = x1
        return multiplicand1, multiplicand2
    else:
        multiplicand1 = abs(x2)
        multiplicand2 = abs(x1)
        return multiplicand1, multiplicand2
    
def calculate2(y1, y2, p, q, multiplicand1, multiplicand2):
    after_y1 = Decimal(y1 * multiplicand1)
    after_y2 = Decimal(y2 * multiplicand2)
    after_p = Decimal(p * multiplicand1)
    after_q = Decimal(q * multiplicand2)
    return after_y1, after_y2, after_p, after_q

def calculate3(after_y1, after_y2, after_p, after_q, x1, y1, p):
    y = Decimal(after_p + after_q) / Decimal(after_y1 + after_y2)
    y = round(y, 3)
    x = Decimal(p - y1 * y) / Decimal(x1)
    x = round(x, 3)
    print('%.3f %.3f' % (x, y))
    
if __name__ == '__main__':
    main()

Python: hoe

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" %(x, y))
    except:
        break

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

    
    x_out = round(x,3)
    if int(x_out) == 0:
        x_out = 0
    
    y_out = round(y,3)
    if int(y_out) == 0:
        y_out = 0
    
    print("{0:.3f}".format(x_out) + " " + "{0:.3f}".format(y_out))

Python: 

while True:
    try:
        line=input()

    except:
        break

    a,b,c,d,e,f=map(int, line.strip().split())

    z=a*e-b*d
    if z==0:
        break

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

    print('{:.3f} {:.3f}'.format(x,y))

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

Python: import sys

for i in sys.stdin.readlines():
    a, b, c, d, e, f = [int(x) for x in i.split()]
    y = (c * d - a * f) / (b * d - a * e)
    x = (c - b * y) / a
    print('{0:.3f} {1:.3f}'.format(x, y))

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

for item in dataset:
    a, b, c, d, e, f = list(map(int, item.split()))
    k1 = e * (a/d)
    k2 = f * (a/d)

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

Python: import sys
for line in sys.stdin.readlines():
    a, b, c, d, e, f=map(float,line.split())
    k=(a*e)-(b*d)
    xval=(c*e)-(b*f)
    yval=(a*f)-(c*d)
    print("%.3f %.3f"%(xval/k,yval/k))

Python: def _round(x, d=0):
    p = 10 ** d
    return (x * p * 2 + 1) // 2 / p


try:
    while 1:
        a, b, c, d, e, f = list(map(int, input().split()))
        s = (a * e - b * d)
        x = e * c - b * f
        y = -c * d + a * f

        print("{:0.3f}".format(_round(x / s, 4)), "{:0.3f}".format(_round(y / s, 4)))
except:
    pass

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

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)
        print("{0:.3f}".format(x),end = ' ')
        print("{0:.3f}".format(y))
    except EOFError:
        break

Python: import sys
for i in sys.stdin:
    a, b, c, d, e, f = map(int, i.split())
    x = (c * e - b * f) / (a * e - b * d)
    y = (c * d - a * f) / (b * d - a * e)
    x = abs(x) if abs(x) < 10e-4 else x
    y = abs(y) if abs(y) < 10e-4 else y
    print("{:.3f} {:.3f}".format(x, y))

Python: while True:
	try:
		A=[int(j) for j in input().split()]
		a=A[3]/A[0]
		for i in range(3):
			A[i]*=a
		for i in range(3):
			A[i]=A[i]-A[i+3]
		y=A[2]/A[1]
		x=(A[5]-A[4]*y)/A[3]
		print("%f %f"%(x+0,y+0))
	except EOFError:
		break