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: 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: import sys

for line in sys.stdin:
    a, b, e, c, d, f = map(int, line.split())
    det = a * d - b * c
    a11 = d / det
    a12 = - b / det
    a21 = - c / det
    a22 = a / det
    print("%.3f %.3f" % (round(a11 * e + a12 * f, 3), round(a21 * e + a22 * f, 3)))

Python: # input
inputs = []
while True:
  try:
    inputs.append(list(map(float,input().split())))
  except EOFError:
    break

# calculation
for i in inputs:
  x=(i[2]*i[4]-i[1]*i[5])/(i[0]*i[4]-i[1]*i[3])
  y=(i[0]*i[5]-i[2]*i[3])/(i[0]*i[4]-i[1]*i[3])
  if x == -0.000:x=0
  if y == -0.000:y=0
  print("{0:.3f} {1:.3f}".format(x,y))

Python: while 1:
    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:
        break

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)
ans2= "{0:.3f}".format(((-d * c) + (  a * f)) / g)
print (ans1,ans2)

Python: import sys
import numpy as np

d = sys.stdin.readline()
while d:
    a,b,c,d,e,f = map(int,d.split())
    A = np.array([[a,b],[d,e]])
    B = np.array([c,f])
    x = np.linalg.inv(A).dot(B)
    print("%.3f %.3f"%(x[0],x[1]))

    d = sys.stdin.readline()

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]
        x_2 = "{0:.3f}".format(x)
        y_2 = "{0:.3f}".format(y)
        print(str(x_2) + " " + str(y_2))
except EOFError:
    pass

Python: while True:
    try:
        a,b,c,d,e,f = (float(x) for x in input().split())
        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(format(x, ".3f"), format(y, ".3f"))
    except EOFError:
        break

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: def get_input():
    while True:
        try:
            yield ''.join(input())
        except EOFError:
            break

N = list(get_input())
for l in range(len(N)):
    a,b,c,d,e,f = [float(i) for i in N[l].split()]
    x = (c*e-f*b)/(a*e-b*d)
    y = (f*a-c*d)/(a*e-b*d)
    print(format(x+0.0,'.3f'), format(y+0.0,'.3f'))

Python: while 1:
    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:
        break

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

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

Python: 
import sys
import math

r = sys.stdin.readlines()


n = [[float(i) for i in (j.split())] for j in r] 
    
for l in n:
    y = (l[2]*l[3]-l[0]*l[5])/(l[1]*l[3]-l[0]*l[4])+0
    
    x = (l[2]*l[4]-l[5]*l[1])/(l[0]*l[4]-l[3]*l[1])+0
    
    print("%.3f %.3f" %(x, y))

Python: import sys

for line in sys.stdin:
    nums = line.split(" ")
    a, b, e, c, d, f = int(nums[0]),int(nums[1]),int(nums[2]),int(nums[3]),int(nums[4]),int(nums[5])
    print('{0:.3f} {1:.3f}'.format((e*d-b*f)/(a*d-b*c), (a*f-e*c)/(a*d-b*c)))

Python: import sys
L = sys.stdin.readlines()
for line in L:
	A = line.split()
	a, b, c, d, e, f = [int(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: #!/usr/bin/env python
# -*- coding: utf-8 -*-

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

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("%.3f %.3f"%(x,y))
    except:
        break

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

Python: try:
    while 1:

        a,b,c,d,e,f  = list(map(int,input().split()))
        y = (c * d - f * a) / (d * b - a * e)
        x = (c - b * y) / a

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

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)
	print('{0:.3f} {1:.3f}'.format(x, y))

Python: #!/usr/bin/env python
# -*- coding: utf-8 -*-

while True:
    a, b, c, d, e, f = map(float, input().split())
    tmp = a/d
    y = (c - tmp*f)/(b - tmp*e)
    x = (c - b*y)/a
    x = round(x)
    y = round(y)
    print('%.3f %.3f' % (x, y))

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([3,6]))[1])
        print(x,y)
    except:
        break

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)))#dont int+str
    print("%.3f %.3f"%(x,y))

Python: try:
    while True:
        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)

        x=round(x,3)
        y=round(y,3)
        print("{0:.3f}".format(x),"{0:.3f}".format(y))
except EOFError:
    pass