Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Split(bufio.ScanWords)
	for {
		data := nextInts(6)
		if data[0] == 0 || data[1] == 0 || data[2] == 0 || data[3] == 0 || data[4] == 0 || data[5] == 0 {
			break
		}
		fmt.Printf("%.3f\n", Round(GetX(data[0], data[1], data[2], data[3], data[4], data[5]), 3))
		fmt.Printf("%.3f\n", Round(GetY(data[0], data[1], data[2], data[3], data[4], data[5]), 3))
	}
}

func GetX(a, b, c, d, e, f float64) float64 {
	return ((c * e) - (b * f)) / ((a * e) - (b * d))
}

func GetY(a, b, c, d, e, f float64) float64 {
	return ((c * d) - (a * f)) / ((b * d) - (a * e))
}

func Round(f float64, places int) float64 {
	shift := math.Pow(10, float64(places))
	return math.Floor(f*shift+.5) / shift
}

func next() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() float64 {
	a, _ := strconv.Atoi(next())
	return float64(a)
}

func nextInts(n int) []float64 {
	a := make([]float64, n)
	for i := 0; i < n; i++ {
		a[i] = nextInt()
	}
	return a
}

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

Python: x = int(0)
y = int(0)

while 1:
	try:
		data = raw_input().split()

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

		# a*x + b*y = c
		# d*x + e*y = f

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

		print(float(format(x, '.3f')))
		print(float(format(y, '.3f')))

	except:
		break

Python: import sys
for line in sys.stdin:
    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:
        a,b,c,d,e,f = list(map(float, input().split()))
    except EOFError:
        break
    print("{0:.3f} {1:.3f}".format((c*e-b*f)/(a*e-b*d)+0., (a*f-c*d)/(a*e-b*d)+0.))

Python: import sys
import numpy as np

for line in sys.stdin:
    a11,a12,b1,a21,a22,b2 = list(map(int, line.split()))

    A=np.array([[a11,a12],[a21,a22]])
    B=np.array([b1,b2])

    x,y=np.linalg.solve(A,B)
    
    print("{0:.3f} {1:.3f}".format(x,y))

Python: a, b, c, d, e, f = map(float, input().split())

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

print(x,y)

Python: import sys
from decimal import Decimal

def main():
    for input_line in sys.stdin:
        input_line = raw_input()
        x1 = int(input_line.split(' ')[0])
        y1 = int(input_line.split(' ')[1])
        p = int(input_line.split(' ')[2])
        x2 = int(input_line.split(' ')[3])
        y2 = int(input_line.split(' ')[4])
        q = int(input_line.split(' ')[5])
        multiplicand1, multiplicand2 = calculate1(x1, x2)
        after_y1, after_y2, after_p, after_q = calculate2(y1, y2, p, q, multiplicand1, multiplicand2)
        calculate3(after_y1, after_y2, after_p, after_q, x1, y1, p)
    
def calculate1(x1, x2):
    if (x1 >= 0 and x2 >= 0) or (x1 < 0 and x2 < 0):
        multiplicand1 = -x2
        multiplicand2 = x1
        return multiplicand1, multiplicand2
    else:
        multiplicand1 = abs(x2)
        multiplicand2 = abs(x1)
        return multiplicand1, multiplicand2
    
def calculate2(y1, y2, p, q, multiplicand1, multiplicand2):
    after_y1 = y1 * multiplicand1
    after_y2 = y2 * multiplicand2
    after_p = p * multiplicand1
    after_q = q * multiplicand2
    return after_y1, after_y2, after_p, after_q

def calculate3(after_y1, after_y2, after_p, after_q, x1, y1, p):
    y = Decimal(after_p + after_q) / Decimal(after_y1 + after_y2)
    x = Decimal(p - y1 * y) / Decimal(x1)
    print('%.3f %.3f' % (x, y))
    
if __name__ == '__main__':
    main()

Python: while True:
    try:
        a,b,c,d,e,f=[int(i) for i in input().split()]
        x=(c*e-f*b)/(a*e-b*d)
        y=(a*f-d*c)/(a*e-b*d)
        print("{:.3f} {:.3f}".format(x,y))
    except:
        break

Python: listal=[]
while True:
    try:
        listal.append(input())
    except:
        break
for i in listal:
    j=list(map(int,i.split()))
    y=(j[3]*j[2]-j[0]*j[5])/(j[1]*j[3]-j[0]*j[4])
    x=(j[2]-j[1]*y)/j[0]
    print('{:.3f}'.format(x),'{:.3f}'.format(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' % (x , y))

Python: import sys
for line in sys.stdin:
    a, b, c, d, e, f = map(int, line.split())
    n1, n2 = -b/a*d, c/a*d
    n1 += e
    n2 = -n2 + f
    y = n2/n1
    x = (c - b*y)/a
    print("{:.3f} {:.3f}".format(x, y))

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

def get_input():
    while True:
        try:
            yield ''.join(input())
        except EOFError:
            break

if __name__ == "__main__":
    inputlist = list(get_input())
    for line in inputlist:
        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: while True:
	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 sys
for i in sys.stdin:
    a, b, c, d, e, f = map(int, i.split())
    print("{0:.3f} {1:.3f}".format(round((c * e - b * f) / (a * e - b * d), 3), round((c * d - a * f) / (b * d - a * e), 3)))

Python: while True:
    try:
        a, b, c, d, e, f = map(int, input().split())
        tb, tc = d*b, d*c
        te, tf = a*e, a*f
        y = (tc-tf)//(tb-te)
        x = (c-(y*b))//a
        print("{0:.3f} {1:.3f}".format(x+0, y+0))

    except:
        break

Python: import fileinput
if __name__ == "__main__":
    for line in fileinput.input():
        v = [int(i) for i in line.split(" ")]
        x = (v[2] * v[4] - v[1] * v[5]) / (v[0] * v[4] - v[1] * v[3])
        y = (v[2] * v[3] - v[0] * v[5]) / (v[1] * v[3] - v[0] * v[4])
        if -0.0005 < x <= 0:
            x = 0.000
        if -0.0005 < y <= 0:
            y = 0.000
        print(format(x, ".3f"), format(y, ".3f"))

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