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)
	}
}

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

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 ("%.3f %.3f" % (round(x,-4), round(y,-4)))
    except:
        break

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

Python: import sys

for line in sys.stdin:
    (a, b, c, d, e, f) = [float(i) for i in line.split()]
    det = a * e - b * d
    x = (e * c - b * f) / det
    y = (-d * c + a * f) / det
    print("%0.3f %0.3f" % (x, y))

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: (a,b,c,d,e,f)  =  map(int,input().split())
g = (a * e)  - (b * d)
ans1= "{0:.3f}".format((( e * c) + ( -b * f)) / g)
ans2= "{0:.3f}".format(((-d * c) + (  a * f)) / g)
(a,b,c,d,e,f)  =  map(int,input().split())
g = (a * e)  - (b * d)
ans3= "{0:.3f}".format((( e * c) + ( -b * f)) / g)
ans4= "{0:.3f}".format(((-d * c) + (  a * f)) / g)
print (ans1,ans2)
print (ans3,ans4)

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(1000*x)/1000
        y = round(1000*y)/1000
        print ("%.3f %.3f" % (x, y))
    except:
        break

Python: import math
import sys

while True:
	try:
		a,b,c,d,e,f = map(float, input().split())
		if a*e == b*d:
			continue
		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)) 
	except EOFError:
		break

Python: def function(a,b,c,d,e,f):
    y = (c - a*f/d)/(b - a*e/d)
    x = (c - b*y)/a
    print('{:.3f}'.format(float(x)), '{:.3f}'.format(float(y)))

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

Python: import numpy

Python: # ????????£???????¨????????§£???????????°??????
# ax + by = c
# dx + ey = f
import sys

def inverse(a, b, d, e):
    deta = a * e - b * d
    return (deta, e, -b, -d, a)

while True:
    data = sys.stdin.readline()
    if data is None or data.strip() == '':
        break
    data = data.strip().split(' ')
    a, b, c, d, e, f = [float(i) for i in data]

    inv = inverse(a, b, d, e)
    x = (inv[1] * c + inv[2] * f) / inv[0]
    y = (inv[3] * c + inv[4] * f) / inv[0]

    print('%.4f %.4f' % (x, y))

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))