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: while True:
    try:
        a, b, c, d, e, f = map(float, input().split())
    except:
        break
    y = (c*d-f*a) / (b*d-e*a)
    x = (c - b*y) / a
    print(x, 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}'.format(x+0, y+0))

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

Python: # coding: utf-8
# Your code here!

c = 0.0001
while True:
    try:
        a = list(map(int,input().split()))
        b1 = a[0]*a[4]-a[3]*a[1]
        b2 = a[2]*a[4]-a[5]*a[1]
        b3 = a[0]*a[5]-a[3]*a[2]
        print("{0:.3f} {1:.3f}" .format(b2/b1 + c, b3/b1 + c))
    except EOFError:
        break

Python: import sys

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

Python: import sys
for line in sys.stdin.readlines():
#for line in data.split('\n'):
	a,b,c,d,e,f = [int(s) for s in line.split()]
	x = (c*e-b*f) / (a*e-b*d)
	y = (c*d-a*f) / (b*d-a*e)
	print('{0:.3f} {1:.3f}'.format(x,y))

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

Python: import sys

lines = sys.stdin.readlines()
for l in lines:
    nums = list(map(int, l.split()))
    A = [nums[0], nums[1], nums[3], nums[4]]
    B = [nums[2], nums[5]]
    detA = A[0]*A[3] - A[1]*A[2]
    inA = [A[3], -A[1], -A[2], A[0]]
    solutions = [n/detA+0.0 for n in [inA[0]*B[0] + inA[1]*B[1], inA[2]*B[0] + inA[3]*B[1]]]
    print("%.3f %.3f" % (solutions[0], solutions[1]))

Python: while True:
    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: import sys

def gcd(a,b):
	while True:
		a, b = b, a%b
		if b==0:
			return a

def lcm(a,b):
	return a*b // gcd(a,b)

for line in sys.stdin:
	a,b,c,d,e,f = map(float, line.split())
	m1 = lcm(b,e)/b
	m2 = lcm(b,e)/e
	x_ = a*m1-d*m2
	z_ = c*m1-f*m2
	x_new = z_/x_
	m1 = lcm(a,d)/a
	m2 = lcm(a,d)/d
	y_ = b*m1-e*m2
	z_ = c*m1-f*m2
	y_new = z_/y_
	print("{:.3f} {:.3f}".format(x_new,y_new))

Python: import sys

for line in sys.stdin:
    ll = [int(x) for x in line.split()]
    #print(ll)
    a = ll[0]
    b = ll[1]
    c = ll[2]
    d = ll[3]
    e = ll[4]
    f = ll[5]

    x = format((c*e-b*f)/(a*e-b*d), '.3f')
    y = format((a*f-d*c)/(a*e-d*b), '.3f')
    print(x, y)

Python: import sys
for e in sys.stdin:
    a, b, c, d, e, f = map(int, e.split())
    y=(c*d-a*f)/(b*d-a*e)
    x = (c-b*y)/a
    print (str(round(x, 3))+" "+str(round(y, 3)))

Python: import math
while(True):
    try:
        list = [ float(x) for x in raw_input().split() ]
        x = (list[2]*list[4]-list[1]*list[5])/(list[0]*list[4]-list[1]*list[3])
        y = (list[0]*list[5]-list[2]*list[3])/(list[0]*list[4]-list[1]*list[3])
        
        print("%.3f %.3f" %(x, y))
        
    except EOFError:
        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]
    print(str(round(x,3)) + ' ' +  str(round(y,3)))

Python: import sys
for e in sys.stdin:
    a, b, c, d, e, f = map(int, e.split())
    y=(c*d-a*f)/(b*d-a*e)
    x = (c-b*y)/a
    print (round(x, 3)+' '+round(y, 3))

Python: (a,b,c,d,e,f)  =  map(int,input().split())
g = (a * e)  - (b * d)
ans1= "{0:.3f}".format((( e * c) + ( -b * f)) / g + 0)
ans2= "{0:.3f}".format(((-d * c) + (  a * f)) / g + 0)
(a,b,c,d,e,f)  =  map(int,input().split())
g = (a * e)  - (b * d)
ans3= "{0:.3f}".format((( e * c) + ( -b * f)) / g + 0)
ans4= "{0:.3f}".format(((-d * c) + (  a * f)) / g + 0)
print (ans1,ans2)
print (ans3,ans4)

Python: while True:
    try:
        a, b, c, d, e, f = [int(i) for i in input().split()]

        detA = a * e - b * d
        detA1 = c * e - b * f
        detA2 = a * f - c * d

        print('{:.3f} {:.3f}'.format(detA1 / detA + 0, detA2 / detA + 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 = (e*c-b*f) / (a*e-b*d)
        y = ((-(d*c)+a*f) / (a*e-b*d))
        print("{:.3f} {:.3f}".format(x,y))
    except:
        break

Python: import sys
import math

r = sys.stdin.readlines()

r.pop(0)

n = [[int(i) for i in (j.split())] for j in r] #n is list of each lines

for l in n:
    y = (l[2]*l[3]-l[0]*l[5])/(l[1]*l[3]-l[0]*l[4])
    
    x = (l[2]-l[1]*y)/l[0]
    
    print("{:.3f} {:.3f} ".format(x,y))

Python: while True:
	try:
		a,b,c,d,e,f = map(int,input().split())
	except:
		break
	y = (c * d - a * f) / (b * d - a * e)
	x = (c - b * y) / a
	xs = str(round(x,3))
	ys = str(round(y,3))
	while xs[::-1].find(".") < 3:
		xs += "0"
	while ys[::-1].find(".") < 3:
		ys += "0"
	print(xs,ys)

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,y))
        except:
            break

Python: while True:
	s = input().split()

	try:
		a = int(s[0])
		b = int(s[1])
		c = int(s[2])
		d = int(s[3])
		e = int(s[4])
		f = int(s[5])
	except:
		break

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

Python: import sys
L = sys.stdin.readlines()
for line in L:
	A = line.split()
	a, b, c, d, e, f = [float(A[i]) for i in range(6)]
	x = (b * f - c * e) / (b * d - a * e)
	y = (c * d - a * f) / (b * d - a * e)
	print("{:.3f}, {:.3f}".format(x+0, y+0))

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