Go: package main

import "fmt"

func main() {
	var resultX, resultY [100]float32
	var count 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
		}
		//Simultaneous equation
		y = (((a * f) - (d * c)) / ((a * e) - (b * d)))
		x = ((c - (b * y)) / a)
		resultX[count] = x
		resultY[count] = y
		count++
	}
	for i := 0; i < count; i++ {
		fmt.Printf("%.3f %.3f\n", resultX[i], resultY[i])
	}
}

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: while(True):
    try:
        a,b,c,d,e,f= map(float,input().split(" "))
        det=a*e-b*d
        if(det!=0):
            x=(c*e-b*f)/det
            y=(a*f-c*d)/det
        print("{:.3f} {:.3f)".format(x+0,y+0))
    except:
        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: import sys
for line in sys.stdin:
    a,b,c,d,e,f = map(int, line.split())
    y = (c/a - f/d)/(b/a - e/d)
    x = -(e/d) * y + (f/d)
    print("%.3f %.3f" % (x, y))

Python: def getX(value):
	numerator = value[2] * value[4] - value[1] * value[5]
	denominator = value[0] * value[4] - value[1] * value[3]
	return numerator / denominator

def getY(value):
	numerator = value[2] * value[3] - value[0] * value[5]
	denominator = value[1] * value[3] - value[0] * value[4]
	return numerator / denominator

while True:
	try:
		value = []
		for i in input().split(" "):
			value.append(int(i))
		x = getX(value)
		y = getY(value)
		print('%.3f %.3f'%(round(x, 3),round(y, 3)))
	except EOFError:
		break

Python: import sys

for line in sys.stdin:
    a, b, c, d, e, f = map(int, line.split())
    y = (a * f - d * c) / (a * e - b * d)
    x = (c * e - b * f) / (a * e - b * d)
    if x == 0:        x = abs(x)
    if y == 0:        x = abs(y)       
    print('{:.3f} {:.3f}'.format(x, y))

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

Python: # -*-coding:utf-8

import numpy as np

def main():

    tokens = raw_input().split(' ')

    for i in range(6):
        tokens[i] = int(tokens[i])

    A = np.array([[tokens[0],tokens[1]] ,[tokens[3],tokens[4]]])
    B = np.array([tokens[2],tokens[5]])

    X = np.linalg.solve(A, B)

    for i in range(2):
        if X[i] == -0.000:
            X[i] = abs(X[i])

    print( '%.3f %0.3f' % (X[0], X[1]) )

    return 0

if __name__ == '__main__':
    for i in range(2):
        main()

Python: z = []
while True:
	try:
		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)
		z.append([x, y])
	
	except:
		break
for i in z:
	print("{:.3f} {:.3f}".format(i[0] + 0, i[1] + 0))

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

Python: while True:
    try:
        a, b, c, d, e, f = map(float, input().split())
    except:
        break
    y = (c*d-f*a) / (b*d-e*a)
    x = (c - b*y) / a
    print(x, y)

Python: import sys
  
lines = sys.stdin.readlines()
for line in lines:
    a, b, c, d, e, f = map(float, line.split())
    if a * e - b * d == 0:
        break
    x = (e * c + (-b) * f)/(a * e - b * d)
    y = ((-d) * c + a * f)/(a * e - b * d)
    print('{:.3f} {:.3f}'.format(x+0, y+0))

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

Python: # coding: utf-8
# Your code here!

c = 0.0001
while True:
    try:
        a = list(map(int,input().split()))
        b1 = a[0]*a[4]-a[3]*a[1]
        b2 = a[2]*a[4]-a[5]*a[1]
        b3 = a[0]*a[5]-a[3]*a[2]
        print("{0:.3f} {1:.3f}" .format(b2/b1 + c, b3/b1 + c))
    except EOFError:
        break

Python: import sys

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

Python: import sys
for line in sys.stdin.readlines():
#for line in data.split('\n'):
	a,b,c,d,e,f = [int(s) for s in line.split()]
	x = (c*e-b*f) / (a*e-b*d)
	y = (c*d-a*f) / (b*d-a*e)
	print('{0:.3f} {1:.3f}'.format(x,y))

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

Python: import sys

lines = sys.stdin.readlines()
for l in lines:
    nums = list(map(int, l.split()))
    A = [nums[0], nums[1], nums[3], nums[4]]
    B = [nums[2], nums[5]]
    detA = A[0]*A[3] - A[1]*A[2]
    inA = [A[3], -A[1], -A[2], A[0]]
    solutions = [n/detA+0.0 for n in [inA[0]*B[0] + inA[1]*B[1], inA[2]*B[0] + inA[3]*B[1]]]
    print("%.3f %.3f" % (solutions[0], solutions[1]))

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

        n = d/a
        a = n*a
        b = n*b
        c = n*c

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

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

Python: import sys

def gcd(a,b):
	while True:
		a, b = b, a%b
		if b==0:
			return a

def lcm(a,b):
	return a*b // gcd(a,b)

for line in sys.stdin:
	a,b,c,d,e,f = map(float, line.split())
	m1 = lcm(b,e)/b
	m2 = lcm(b,e)/e
	x_ = a*m1-d*m2
	z_ = c*m1-f*m2
	x_new = z_/x_
	m1 = lcm(a,d)/a
	m2 = lcm(a,d)/d
	y_ = b*m1-e*m2
	z_ = c*m1-f*m2
	y_new = z_/y_
	print("{:.3f} {:.3f}".format(x_new,y_new))

Python: import sys

for line in sys.stdin:
    ll = [int(x) for x in line.split()]
    #print(ll)
    a = ll[0]
    b = ll[1]
    c = ll[2]
    d = ll[3]
    e = ll[4]
    f = ll[5]

    x = format((c*e-b*f)/(a*e-b*d), '.3f')
    y = format((a*f-d*c)/(a*e-d*b), '.3f')
    print(x, y)

Python: import sys
for e in sys.stdin:
    a, b, c, d, e, f = map(int, e.split())
    y=(c*d-a*f)/(b*d-a*e)
    x = (c-b*y)/a
    print (str(round(x, 3))+" "+str(round(y, 3)))

Python: import math
while(True):
    try:
        list = [ float(x) for x in raw_input().split() ]
        x = (list[2]*list[4]-list[1]*list[5])/(list[0]*list[4]-list[1]*list[3])
        y = (list[0]*list[5]-list[2]*list[3])/(list[0]*list[4]-list[1]*list[3])
        
        print("%.3f %.3f" %(x, y))
        
    except EOFError:
        break