Go: package main

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

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]
		var mulA, mulD int
		if a < 0 {
			mulA = a * -1
		} else {
			mulA = a
		}
		if d < 0 {
			mulD = d * -1
		} else {
			mulD = d
		}
		a *= mulD
		b *= mulD
		c *= mulD
		d *= mulA
		e *= mulA
		f *= mulA

		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.Print(x)
		fmt.Println(".000")
		fmt.Print(y)
		fmt.Println(".000")
	}
}

Python: import math

def my_round(x,d=0):
    p = 10 ** d
    return float(math.floor((x * p) + math.copysign(0.5, x))) / p

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.a * self.f - self.c * self.d)
        try:
            x = my_round(temp_a / temp, 4)
        except ZeroDivisionError:
            x = my_round(temp_a / 1.0, 4)

        try:
            y = my_round(temp_b / temp, 4)
        except ZeroDivisionError:
            y = my_round(temp_b / 1.0, 4)

        return x, y


    def print(self):
        ans = self.calc()
        print("{0:.3f} {1:.3f}".format(ans[0], 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 num in data:
        num.print()

if __name__ == "__main__":
    main()

Python: while 1:
    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: # ????????£???????¨????????§£???????????°??????
# 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(' ')
    print('data:%s' % data)
    a, b, c, d, e, f = [float(i) for i in data]

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

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

Python: try:
    s = []
    while True:
        l = list(map(float, input().split()))
        x = (l[2] * l[4] - l[5] * l[1]) / (l[0] * l[4] - l[3] * l[1])
        y = (l[2] - l[0] * x) / l[1]
        if x == -0 and y == -0:
            x = abs(x)
            y = abs(y)
        elif x == -0:
            x = abs(x)
        elif  y == -0:
            y = abs(y)
        else:
            pass
        
        x_2 = "{0:.3f}".format(x)
        y_2 = "{0:.3f}".format(y)
        print(str(x_2) + " " + str(y_2))
except EOFError:
    pass

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: while 1:
    i = input().split()
    if i == []:
        break
    else:
        a, b, c, d, e, f = map(float, i)
        x = (e*c - b*f)/(e*a - b*d)
        y = (c*d - f*a)/(d*b - e *a)

        print(x,y)

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

Python: from decimal import Decimal, ROUND_HALF_UP
while 1:
    try:
        a,b,c,d,e,f=map(float,input().split())
        x=(c*e-b*f)/(a*e-b*d)+0.0
        y=(c*d-a*f)/(b*d-a*e)+0.0
        print(Decimal(str(x)).quantize(Decimal('0.001'), rounding=ROUND_HALF_UP),Decimal(str(y)).quantize(Decimal('0.001'), rounding=ROUND_HALF_UP))
    except:break

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

Python: # usr/bin/python
# coding: utf-8
################################################################################
# Simultaneous Equation
# Write a program which solve a simultaneous equation:
#
# ax+by=c
# dx+ey=f
#
# The program should print x and y for given a, b, c, d, e and f (-1,000 ??? a,b,c,d,e,f ??? 1,000). You can suppose that given equation has a unique solution.
#
# Input
# The input consists of several data sets, 1 line for each data set. In a data set, there will be a,b,c,d,e,f separated by a single space. The input terminates with EOF.
#
# Output
# For each data set, print x and y separated by a single space. Print the solution to three places of decimals. Round off the solution to three decimal places.
#
# Sample Input 1
# 1 2 3 4 5 6
# 2 -1 -2 -1 -1 -5
# Output for the Sample Input 1
# -1.000 2.000
# 1.000 4.000
# Sample Input 2
# 2 -1 -3 1 -1 -3
# 2 -1 -3 -9 9 27
# Output for the Sample Input 2
# 0.000 3.000
# 0.000 3.000
#
################################################################################

import sys

if __name__ == "__main__":

    for line in sys.stdin:
        a = float(line.split(" ")[0])
        b = float(line.split(" ")[1])
        c = float(line.split(" ")[2])
        d = float(line.split(" ")[3])
        e = float(line.split(" ")[4])
        f = float(line.split(" ")[5])

        x = (e*c-b*f)/(a*e-b*d)
        y = (-d*c+a*f)/(a*e-b*d)
        print("{:-.4f} {:-.4f}".format(round(x,4),round(y,4)))

Python: import sys

strs = []

for line in sys.stdin:
    strs.append(line)

for s in strs:
	a, b, c, d, e, f = map(int, s.split())

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

	print('{:.3f} {:.3f}'.format(round(x,3)+0.0,round(y,3)+0.0))

Python: import numpy as np
while True:
	try:
		a,b,c,d,e,f = (int(i) for i in input().split())
		x,y = [np.dot(np.linalg.inv(np.array([[a,b],[d,e]])),np.array([c,f]))[0],np.dot(np.linalg.inv(np.array([[a,b],[d,e]])),np.array([c,f]))[1]]
		print(x,y)
	except EOFError:
		break

Python: import math
def gcd(x, y):
    x, y = math.fabs(x), math.fabs(y)
    y, x = max(x, y), min(x, y)
    if x == 0:
        return y

    return gcd(x, y % x)

try:
    while 1:

        a,b,c,d,e,f  = list(map(int,input().split()))
        s = gcd(a, d)

        k1 = d / s * -1
        k2 = a / s

        y = (k1*c + k2 * f) / (k1 * b + k2 * e)
        x = (c - b*y) / a
        print("{:.3f} {:.3f}".format(x, y))
except Exception:
    pass

Python: import sys

def simeq(a,b,c,d,e,f):
    return ((c*e-b*f)/(a*e-b*d),((a*f-c*d)/(a*e-b*d)))

if __name__ == '__main__':
    for line in sys.stdin:
        (a,b,c,d,e,f) = map(int,line.split())
        (x,y) = simeq(a,b,c,d,e,f)
        print("{:.3f} {:.3f}".format(x,y))

Python: for i in range(2):
    a,b,c,d,e,f = [float(i) for i in input().split()]
    x = round((1/a)*(c-b*((a*f-c*d)/(a*e-b*d))),3)
    y = round((a*f-c*d)/(a*e-b*d),3)
    print(
        '{:.3f}'.format(x),'{:.3f}'.format(y),
    )

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(x, y)