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
		if bE==0{
		    bE=1
		}
		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(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

Python: #83 連立方程式

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

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

r = sys.stdin.readlines()



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: # usr/bin/python
# coding: utf-8
################################################################################
# Simultaneous Equation
# Write a program which solve a simultaneous equation:
#
# ax+by=c
# dx+ey=f
#
# The program should print x and y for given a, b, c, d, e and f (-1,000 ??? a,b,c,d,e,f ??? 1,000). You can suppose that given equation has a unique solution.
#
# Input
# The input consists of several data sets, 1 line for each data set. In a data set, there will be a,b,c,d,e,f separated by a single space. The input terminates with EOF.
#
# Output
# For each data set, print x and y separated by a single space. Print the solution to three places of decimals. Round off the solution to three decimal places.
#
# Sample Input 1
# 1 2 3 4 5 6
# 2 -1 -2 -1 -1 -5
# Output for the Sample Input 1
# -1.000 2.000
# 1.000 4.000
# Sample Input 2
# 2 -1 -3 1 -1 -3
# 2 -1 -3 -9 9 27
# Output for the Sample Input 2
# 0.000 3.000
# 0.000 3.000
#
################################################################################

import fileinput

if __name__ == "__main__":
    for line in fileinput.input():
        a = float(line.split(" ")[0])
        b = float(line.split(" ")[1])
        c = float(line.split(" ")[2])
        d = float(line.split(" ")[3])
        e = float(line.split(" ")[4])
        f = float(line.split(" ")[5])

        x = (e*c-b*f)/(a*e-b*d)
        y = (-d*c+a*f)/(a*e-b*d)
        print("{: .4f} {: .4f}".format(round(x,4),round(y,4)))