Go: package main

import "fmt"

func main() {

	for {
		var a, b, c, d, e, f float64
		var x, y float64
		i, _ := fmt.Scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f)
		if i != 6 {
			return
		}

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

		fmt.Printf("%.3f %.3f\n", x, y)
	}
}

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

Python: import sys

lines = []
for line in sys.stdin:
    num = line.split(" ")
    a, b, e, c, d, f = int(num[0]), int(num[1]), int(num[2]), int(num[3]), int(num[4]), int(num[5])
    x = (e*d-b*f)/(a*d-b*c)
    y = (a*f-e*c)/(a*d-b*c)
    if x == -0.0:
        x = 0.0
    if y == -0.0:
        y = 0.0
    print("{0:.3f} {1:.3f}".format(x,y))

Python: import numpy as np
while True:
    a,b,c,d,e,f = map(int, input().split())
    ls1 = [[a,b],[d,e]]
    ls2 = [c,f]
    x,y = np.linalg.solve(ls1,ls2)
    print("{0:.4f} {1:.4f}".format(x,y))

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

Python: while 1:
    try:
        a,b,c,d,e,f=[int(i) for i in input().split()]

        y=float((c*d-f*a)/(b*d-e*a))
        x=float((c-b*y)/a)
        print("{0:.4f}".format(x)," ","{0:.4f}".format(y))
    except EOFError:
        break

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