Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

func gcd(num1, num2 int) int {
	if num2 == 0 {
		return num1
	}
	num3 := num1 % num2
	return gcd(num2, num3)
}

func lcm(num1, num2 int) int {
	if num1%num2 != 0 {
		num3 := gcd(num1, num2)
		for i := 1; ; i++ {
			check := num3 * i
			if check%num1 == 0 && check%num2 == 0 {
				return check
			}
		}
	} else {
		return num1
	}
}

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	for scanner.Scan() {
		strNums := strings.Fields(scanner.Text())
		nums := []int{}
		for _, strNum := range strNums {
			num, _ := strconv.Atoi(strNum)
			nums = append(nums, num)
		}
		a := nums[0]
		b := nums[1]
		c := nums[2]
		d := nums[3]
		e := nums[4]
		f := nums[5]
		lcm := lcm(a, d)
		mulA := lcm / a
		mulD := lcm / d
		a *= mulA
		b *= mulA
		c *= mulA
		d *= mulD
		e *= mulD
		f *= mulD

		if d < 0 {
			d *= -1
			e *= -1
			f *= -1
		}

		bE := b - e
		cF := c - f
		if bE==0{
		    bE=1
		}
		y := cF / bE
		x := (c - (y * b)) / a

		
			fmt.Printf("%d.000 ", x)
			fmt.Printf("%d.000\n", 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: 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

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

Python: #連立方程式
import numpy as np

def function(a,b,c,d,e,f):
    A = np.matrix([
    [a, b],
    [d, e]
    ])
    Y = np.matrix([
    [c],
    [f]
    ])
    result = np.linalg.inv(A)*Y
    print('{:.3f}'.format(float(result[0])), '{:.3f}'.format(float(result[1])))

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