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
		y := cF / bE
		x := (c - (y * b)) / a

		fmt.Printf("%d.000 ", x)
		fmt.Printf("%d.000\n", y)
	}
}

Python: from __future__ import division
while True:
	try:
		a, b, c, d, e, f = map(int, raw_input().split())
		D = a*e - b*d
		Dx = c*e - b*f
		Dy = a*f - c*d
		print("%.3f %.3f" % (Dx/D + 0, Dy/D + 0))
	except EOFError:
		break

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

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

Python: import sys
lines = sys.stdin.readlines()

for line in lines:
    s = str(line)
    a,b,c,d,e,f = map(int, s.rstrip('\n').split())
    x = (e*c - b*f) / (a*e - b*d)
    if e*c - b*f == 0:
        x = 0
    x = round(x, 3)
    y = (a*f - c*d) / (a*e - b*d)
    if a*f - c*d == 0:
        y = 0
    y = round(y, 3)
    print(f'{x:.3f} {y:.3f}')

Python: import sys

inputNum = sys.stdin.readlines()[:-1]

for i in inputNum:
    new = []
    n = i[:-1].split(' ', 6)
    for s in n:
        new.append(float(s))
    k = new[0]
    q = 0
    for a in new[0:3]:
        new[q] = a/k
        q = q + 1
    l = new[3]
    for a in new[3:6]:
        new[q] = a - l*new[q-3]
        q = q + 1
    if new[4] == 0:
        y = new[5]
    else:
        y = new[5]/new[4]
    x = new[2]-(new[1]*y)
    print("{0:.3f}".format(x)+" "+"{0:.3f}".format(y))

Python: from __future__ import division
while True:
	try:
		a, b, c, d, e, f = map(int, raw_input().split())
		D = a*e - b*d
		Dx = c*e - b*f
		Dy = a*f - c*d
		print("%.3f %.3f" % (Dx/D, Dy/D))
	except EOFError:
		break

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:
		n=list(map(float, input().split()))#ファイルの読み込み --.py <--.txt
	except EOFError:
		break
	y=(n[3]*n[2]-n[0]*n[5])/(n[1]*n[3]-n[0]*n[4])
	x=(n[2]-n[1]*y)/n[0]
	print('{:.3f}'.format(x), '{:.3f}'.format(y))#format関数を用いて桁を指定

Python: import numpy as np

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

Python: import sys

for line in sys.stdin:
    array = [float(x) for x in line.split()]
    ar1 = array[0:3]
    ar2 = array[3:]
    i = ar1[0]
    ar1 = [x*ar2[0] for x in ar1]
    ar2 = [x*i for x in ar2]
    y = (ar1[2] - ar2[2])/(ar1[1]-ar2[1])
    ar1 = array[0:3]
    x = (ar1[2]-ar1[1]*y)/ar1[0]
    if (x - int(x)) == 0 and (y - int(y)) == 0:
        print(str(round(x,3)) + '00 ' +  str(round(y,3)) + '00')
    elif (x - int(x)) == 0:
        print(str(round(x,3)) + '00 ' +  str(round(y,3)))
    elif (x - int(x)) == 0 and (y - int(y)) == 0:
        print(str(round(x,3)) + ' ' +  str(round(y,3)) + '00')
    else:
        print(str(round(x,3)) + ' ' +  str(round(y,3)))

Python: import sys
from decimal import Decimal

def main():

    #input_strings = sys.stdin.readlines()
    for coef_and_cons in input_strings:
        a, b, c, d ,e, f = map(Decimal, coef_and_cons.split())
        x = (f/e - c/b) / (d/e - a/b)
        y = (f/d - c/a) / (e/d - b/a)
        print('%.3f %.3f' %  (x.quantize(Decimal('0.001'), rounding='ROUND_HALF_DOWN'),
                              y.quantize(Decimal('0.001'), rounding='ROUND_HALF_DOWN') )
             )


main()

Python: import numpy as np
while True:
    try:
        a,b,c,d,e,f = map(int, input().split())
        x,y=map(float,np.dot(np.linalg.inv(np.array([a,b,d,e]).reshape(2,2)),np.array([c,f])))
        print('%.3lf %.3lf' % (x,y))
    except:
        break

Python: while True:
  try:
    a, b, c, d, e, f = map(int, input().split(" "))
    
    det = a * d - b * c
    x = det * (d * e - b * f)
    y = det * ((-c) * e + a * e)

    print(str(x), str(y))

  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])
        print(format(x, ".3f"), format(y, ".3f"))

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

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

Python: import sys
import numpy as np
#np.set_printoptions(formatter={'float': '{: 0.3f}'.format}) #桁を揃える

while True:
    line = sys.stdin.readline()
    if line is '':
        break
    #print(line)
    cnt = 0
    idx = 0
    a = np.array([0.0, 0.0, 0.0, 0.0])
    b = np.array([0.0, 0.0])
    for k in list(map(float, line.split(" "))):
        if cnt == 2:
            b[0] = k
            idx -= 1
        elif cnt == 5:
            b[1] = k
        else:
            a[idx] = k
        cnt += 1
        idx += 1
    #print(a, b)
    a = a.reshape(2, 2)
    x = np.linalg.solve(a, b)
    print('{0: .3f} {1: .3f}'.format(x[0], x[1]))

Python: # -*- coding: utf-8 -*-

import sys

def solve_sim_equ(a, b, c, d, e, f):
    '''
    This function solves following equation.
    ax + by = c
    dx + ey = f
    '''
    if a==0 and d==0:
        if b==0 and e==0:
            return 0., 0.
        if b != 0:
            return 0., c/b+0.
        else:
            return 0., f/e+0.
    elif b==0 and e==0:
        if a != 0:
            return 0., d/a+0.
        else:
            return 0., a/d+0.

    if b == 0:
        a, d = d, a
        b, e = e, b
        c, f = f, c
    g = e / b
    x = (g*c - f) / (g*a - d)
    y = (c - a*x) / b
    return x+0., y+0.

def main():
    for line in sys.stdin:
        a,b,c,d,e,f = map(float, line.split())
        x, y = solve_sim_equ(a, b, c, d, e, f)
        print('{0:.3f} {1:.3f}'.format(x,y))

if __name__ == '__main__':
    main()