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

		if x == 0 {
			fmt.Printf("%.3f ", 0.0)
		} else {
			fmt.Printf("%.3f ", x)
		}
		if y == 0 {
			fmt.Printf("%.3f\n", 0.0)
		} else {
			fmt.Printf("%.3f\n", y)
		}
	}
}

Python: import sys
[print("{: .3f} {: .3f}".format((x[4] * x[2] - x[1] * x[5]) / (x[0] * x[4] - x[1] * x[3]), (x[0] * x[5] - x[2] * x[3]) / (x[0] * x[4] - x[1] * x[3]))) for x in [[float(y) for y in x.split()] for x in sys.stdin]]

Python: import sys
#import numpy as np
# AOJではnumpy使えません
#np.set_printoptions(formatter={'float': '{: 0.3f}'.format}) #桁を揃える

lines = sys.stdin.readlines()
for line in lines:
    a = list(map(float, line.split(" ")))
    tmp = a[0]
    for i in range(0, 3):
        a[i] = a[i] * a[3]
    for i in range(3, 6):
        a[i] = a[i] * tmp
    y = (a[2] - a[5]) / (a[1] - a[4])
    x = (a[2] - a[1] * y) / a[0]
    print("{0:0.3f} {1:0.3f}".format(x, y))

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 sys

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

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

Python: from sys import stdin
for l in stdin:
  a,b,c,d,e,f = map(int,l.split())
  x = round((c*e-b*f)/(a*e-b*d),3) + 0.000
  y = round((c*d-a*f)/(b*d-a*e),3) + 0.000
  print("%s %s"%("{0:.3f}".format(x),"{0:.3f}".format(y)))

Python: import sys
dataset = sys.stdin.readlines()
 
for item in dataset:
    a, b, c, d, e, f = list(map(int, item.split()))
 
    y = (c * d - f * a)/(b * d - e * a)
    x = (c * e - b * f) / (a * e - b * d)
    if x == 0:
        x = 0
    print("{:.3f} {:.3f}".format(x, y))

Python: import sys

for line in sys.stdin:
    a,b,c,d,e,f = map(float, line.rstrip().split(' '))
    x = round((b*f-c*e)/(b*d-a*e), 3)
    y = round((a*f-d*c)/(a*e-b*d), 3)
    print("{:.3f} {:.3f}".format(x,y))

Python: while True:
    try:
        lst = list(map(int, input().split()))
        a, b, c, d, e, f = lst[0], lst[1], lst[2], lst[3], lst[4], lst[5]
        x = (b*f - c*e)/(b*d - a*e)
        y = (c*d - a*f)/(b*d - a*e)
        print('{:.3f}'.format(x+0.0), end = " ")
        print('{:.3f}'.format(y+0.0))
    
    except:
        break

Python: # coding: utf-8
# Here your code !
#import math

x=2*[0.0]

#for i in range(2):
a,b,c,d,e,f = list(map(float, input().split()))

if abs(a)<1e-9 :
    x[0] = (b*f - e*c)/b*d
    x[1] = c/b

elif abs(b)<1e-9 :
    x[0] = c/a
    x[1] = (a*f - d*c)/a*e
    
elif abs(d)<1e-9 :
    x[0] = (a*c - f*b)/a*e
    x[1] = f/e
    
elif abs(e)<1e-9 :
    x[0] = f/d
    x[1] = (c*d - f*a)/b*d

else:
    x[0] = (b*f - e*c)/(b*d - a*e)
    x[1] = (c - a*x[0])/b
    
print("%.3f %.3f"%(round(x[0],3), round(x[1],3)))

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

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

Python: while True:
    try:
        a,b,c,d,e,f=map(int,input().split())
    except:
        break
    
    ba=(a*e)-(d*b)
    x1=(c*e)-(f*b)
    y1=(a*f)-(d*c)

    x=round(x1/ba,4)
    if x==0:
        x=0.000
    y=round(y1/ba,4)
    if y==0:
        y=0.000
    print("{:.3f}".format(x),"{:.3f}".format(y))

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

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

Python: import sys
import math
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(round(x,3),round(y,3)))

Python: while 1:
    i = input().split()
    if i == None:
        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: def function(a,b,c,d,e,f):
    y = (c - a*f/d)/(b - a*e/d)
    x = (c - b*y)/a
    print('{:.3f}'.format(float(x)), '{:.3f}'.format(float(y)))

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

Python: # coding: utf-8

while True:
	data = map(int, raw_input().split())
	a = data[0]
	b = data[1]
	c = data[2]
	d = data[3]
	e = data[4]
	f = data[5]

	x = (c*e-b*f)*1.0 / (a*e-b*d)
	if x == -0.000:
		x = 0.000
	if b != 0:
		y = (c-a*x)/b
	else:
		y = (f-d*x)/e
	if y == -0.000:
		y = 0.000

	print("{:.3f} {:.3f}".format(x,y))

Python: try:
    while True:
        a,b,c,d,e,f=map(int, input().split())
        print( (c*e-b*f)/(a*e-b*d), (a*f-c*d)/(a*e-b*d) )
except EOFError:
    pass

Python: from sys import stdin
for line in stdin:
    a, b, c, d, e, f = map(float, line.split())
    print('%lf %lf' % ((c * e - f * b) / (a * e - b * d), (c * d - a * f) / (b * d - a * e)) )

Python: import sys

while True:
	line = sys.stdin.readline()
	if line is '':
		break
	
	(a, b, e, c, d, f) = map(float, line.split())
	
	D = a * d - b * c
	x = (d * e - b * f) / D
	y = (a * f - c * e) / D
	
	print("{0:.3f} {1:.3f}".format(x, y))

Python: for i in range(2):
    a,b,c,d,e,f = map(float,input().split())
    n = a*e-b*d
    print(n)
    x = round((e*c-b*f)/n,4)
    y = round((a*f-d*c)/n,4)
    if x == -0:
        x = 0
    if y == -0:
        y = 0
    print("{0:.3f}".format(x),"{0:.3f}".format(y))

Python: #! /usr/bin/python3

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