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: # coding: utf-8
# Here your code !

import sys
import math

r = sys.stdin.readlines()

r.pop(0)

n = [[float(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])+0
    
    x = (l[2]*l[4]-l[5]*l[1])/(l[0]*l[4]-l[3]*l[1])+0
    
    print("{:.3f} {:.3f} ".format(x,y))

Python: #連立方程式 標準機能のみで
import numpy as np

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

r = sys.stdin.readlines()

r.pop(0)

n = [[float(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())
        x=(c*e-b*f)/(a*e-b*d)
        y=(c-a*x)/b
        if x==-0:
            x=0
        if y==-0:
            y=0
        print(f'{x:.3f} {y:.3f}')
    except EOFError:
        break

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

import sys
import math

r = sys.stdin.readlines()

r.pop(0)

n = [[float(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])+0
    
    x = (l[2]*l[4]-l[5]*l[1])/(l[0]*l[4]-l[3]*l[1])+0
    
    print("{:.3f} {:.3f} ".format(x,y))

Python: # coding: utf-8
# Your code here!
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('%.3f %.3f' % (x,y))
    except:
        break

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: from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
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)
      if x==-0:
         x=int(x)
      if y==-0:
         y=int(y)
      X = Decimal(x).quantize(Decimal('0.001'), rounding=ROUND_HALF_UP)
      Y = Decimal(y).quantize(Decimal('0.001'), rounding=ROUND_HALF_UP)
      print(f'{X:.3f} {Y:.3f}')
   except EOFError:
      break

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

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

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

		a = float(data[0])
		b = float(data[1])
		c = float(data[2])
		d = float(data[3])
		e = float(data[4])
		f = float(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: print('hello')

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)
 print("%.3f %.3f"%((c-b*y)/a,y))

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

import sys
import os


for s in sys.stdin:
    a, b, c, d, e, f = list(map(int, s.split()))

    delta = a * e - b * d
    if delta == 0:
        break
    else:
        x = 1 / delta * (e * c - b * f)
        y = 1 / delta * (-d * c + a * f)
        print('{:.3f} {:.3f}'.format(x + 0, y + 0))

Python: [print("{0:.3f} {1:.3f}".format(
	(k[2] - k[1] * ((k[0] * k[5] - k[2] * k[3]) / (k[0] * k[4] - k[1] * k[3]))) / k[0],
	((k[0] * k[5] - k[2] * k[3]) / (k[0] * k[4] - k[1] * k[3])))
) for i in sys.stdin for k in [int(j) for j in i.split()]]

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

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

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

        print(x/s, y/s)
except:
    pass

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

Python: def main():
	import sys

	w = []

	for line in sys.stdin:
		w = list(map(float, line.split()))
		solve(w)

def solve(w):
	x = (w[2]*w[4]-w[1]*w[5]) / (w[0]*w[4]-w[1]*w[3])
	y = (w[2]*w[3]-w[0]*w[5]) / (w[1]*w[3]-w[0]*w[4])
	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} {1:.3f}'.format(x, y))

if __name__ == '__main__':
	main()

Python: import sys
  
for s in list(sys.stdin):
    a,b,e,c,d,f = list(map(float,s.split()))
    base = a*d-b*c
    x = e*d-b*f
    y = a*f-e*c
    print('%.3f %.3f' % (x/base+0,y/base+0))

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

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

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

Python: import sys

for line in sys.stdin:
    (a, b, c, d, e, f) = [float(i) for i in line.split()]
    det = a * e - b * d
    x = (e * c - b * f) / det
    y = (-d * c + a * f) / det
    print("%0.3f %0.3f" % (x, y))