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: import sys
for line in sys.stdin.readlines():
    a, b, c, d, e, f = [float(x) for x in line.split()]
    if a!=0 and d!=0:
        a, b, c = [x/a for x in [a, b, c]]
        d, e, f = [x/d for x in [d, e, f]]
        y = (c-f) / (b-e)
        x = c - b * y

    else:
        a, b, c = [x/b for x in [a, b, c]]
        d, e, f = [x/e for x in [d, e, f]]
        x = (c-f) / (a-d)
        y = c - a * x
    print(f'{x:.3f} {y:.3f}')

Python: # -*-coding:utf-8

import numpy as np

def main():

    line = input()
    tokens = list(map(float, line.strip().split()))

    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: while True :
    try :
        a, b, c, d, e, f = map(float, input().split())
        
        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(f"{x:.3f} {y:.3f}")
        
    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:
	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:.3f} {1:.3f}".format(x + 0, y + 0))

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

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(nums[l])[0]
    k1 = jisuan(nums[l])[1]
    print("%.3f" % k0, "%.3f" % k1)

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

Python: # AOJ 0004 Simultaneous Equation
# Python3 2018.6.9 bal4u

while True:
	try:
		a = list(map(float, input().split()))
		dd = a[0]*a[4]-a[3]*a[1]
		d1 = a[2]*a[4]-a[5]*a[1]
		d2 = a[0]*a[5]-a[3]*a[2]
		print("{0:.3f} {1:.3f}".format(d1/dd, d2/dd))
	except EOFError:
		break

Python: def main():
    while True:
        try:
            Array = list(map(int,input().split()))
            x = (Array[2]-(Array[1]/Array[4])*Array[5])/(Array[0]-(Array[1]/Array[4])*Array[3])
            y = (Array[5]-Array[3]*x)/Array[4]
        except EOFError:
            break
        print("{0:.3f} {1:.3f} ".format(x,y))




if __name__ == '__main__':
    main()

Python: while True:
    try:raw=[float(i) for i in input().split(" ")]
    except:break
    a=raw[:3]
    b=raw[3:]
    yx=[]
    ed={0:1,1:0}
    for e in range(2):
        ab=[i*b[e] for i in a]
        ba=[i*a[e] for i in b]
        yx.append((ab[2]-ba[2])/(ab[ed[e]]-ba[ed[e]]))
    sisya=[i*10000-int(i*1000)*10 for i in yx]
    kekka=[True if i>4 else False for i in sisya]
    x="{0:.3f}".format(yx[1]+int(kekka[1])/1000)
    y="{0:.3f}".format(yx[0]+int(kekka[0])/1000)
    print(x+" "+y)

Python: import sys

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

Python: #_*_ coding:utf-8 _*_
import sys


while True:
    vals = sys.stdin.readline()
    if(vals is  None or vals.strip() == '' ):
        break
    a,b,c,d,e,f=list( map(float,vals.strip().split()))
    temp = a * e - d * b
    x = (c * e - b * f) / temp + 0.0
    y = (c * d - a * f) / -temp + 0.0
    print('%.3f %.3f' % (x,y))

Python: class Equation():
    def __init__(self, a, b, c, d, e, f):
        self.a = a
        self.b = b
        self.c = c
        self.d = d
        self.e = e
        self.f = f

    def calc(self):
        temp = (self.a * self.e - self.b * self.d)
        temp_a = (self.c * self.e - self.b * self.f)
        temp_b = (self.f * self.a - self.c * self.d)
        x = round(temp_a/temp,4)
        y = round(temp_b/temp,4)

        return x, y

    def print(self):
        self.ans = self.calc()
        print("{0:.3f} {1:.3f}".format(self.ans[0],self.ans[1]))


def main():
    data = []
    while 1:
        try:
            n = input().split()

            a = float(n[0])
            b = float(n[1])
            c = float(n[2])
            d = float(n[3])
            e = float(n[4])
            f = float(n[5])

            data.append(Equation(a, b, c, d, e, f))

        except EOFError:
            break

    for datas in data:
        datas.print()

if __name__ == "__main__":
    main()

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

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
    x = 1 / delta * (e * c - b * f)
    y = 1 / delta * (-d * c + a * f)
    print(x, y)

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
print(z)

Python: import sys

for line in sys.stdin:
    nums = line.split(" ")
    a, b, e, c, d, f = int(nums[0]),int(nums[1]),int(nums[2]),int(nums[3]),int(nums[4]),int(nums[5])
    print('{0:.3f} {1:.3f}'.format(round((e*d-b*f)/(a*d-b*c),4), round((a*f-e*c)/(a*d-b*c),4)))

Python: from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
while True:
    try:
        z = list(map(int,input().split()))
    except:
        break
    a = z[:3]
    b = z[3:]
    c = a[:]
    d = b[:]
    s = [a[0],b[0]]
    a = list(map(lambda x:x*s[1],a))
    b = list(map(lambda x:x*s[0],b))
    y = (b[2]-a[2])/(b[1]-a[1])
    try:
        x = (c[2]-c[1]*y)/c[0]
    except:
        x = (d[2]-d[1]*y)/d[0]
    print(Decimal(str(x)).quantize(Decimal('0.001'), rounding=ROUND_HALF_UP),Decimal(str(y)).quantize(Decimal('0.001'), rounding=ROUND_HALF_UP))

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 x < 10e-4 else x
    y = abs(y) if y < 10e-4 else y
    print("{:.3f} {:.3f}".format(round(x,3), round(y,3)))