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

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

Python: from decimal import Decimal, ROUND_HALF_UP
while True:
    try:
        a, b, c, d, e, f = map(float, input().split())
        x = (c * e - b * f) / (a * e - b * d) + 0.0
        y = (c * d - a * f) / (b * d - a * e) + 0.0
        print(Decimal(str(x)).quantize(Decimal('0.001'), rounding=ROUND_HALF_UP), Decimal(str(y)).quantize(Decimal('0.001'), rounding=ROUND_HALF_UP))
    except:
        break

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

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

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

    A = a*e - b*d
    x = (e*c - b*f)/A
    y = (a*f - d*c)/A
    # 出力の体裁を整え、-0.00を0.00にするため+0する
    print("{:.3f} {:.3f}".format(x+0,y+0))

Python: answers=[]
while True:
    try:
        numbers=input().split()
        for i in range(6):
            numbers[i]=float(numbers[i])
        times=numbers[0]/numbers[3]
        numbers[3]=numbers[3]*times
        numbers[4]=numbers[4]*times
        numbers[5]=numbers[5]*times
        y=(numbers[2]-numbers[5])/(numbers[1]-numbers[4])
        x=(numbers[2]-numbers[1]*y)/numbers[0]
        answers.append(x)
        answers.append(y)
    except:
        break

for i in range(len(answers)/2):
    print(answers[i*2],answers[i*2+1])

Python: import sys
import numpy as np

for i in sys.stdin:
    a,b,c,d,e,f=list(map(float, i.split()))
    A=np.matrix([[a,b],[d,e]])
    inv_A = np.linalg.inv(A)
    P=np.matrix([[c],[f]])
    X=inv_A.dot(P)
    print("{0:.3f} {1:.3f}".format(X[0,0], X[1,0]))

Python: while True:
    try:
        (a, b, e, c, d, f) = map(float, input().split())

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

        if abs(x) < 1e-4:
            x = 0.0
        if abs(y) < 1e-4:
            y = 0.0

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

    except EOFError:
        break

Python: def get_input():
    while True:
        try:
            yield "".join(input())
        
        except EOFError:
            break

if __name__ == "__main__":
    array = list(get_input())
    for i in range(len(array)):
        temp_a,temp_b,temp_c,temp_d,temp_e,temp_f = array[i].split()
        
        a,b,c,d,e,f = int(temp_a),int(temp_b),int(temp_c),int(temp_d),int(temp_e),int(temp_f)
        
        if a!=0:
            if e-b*d/a !=0:
                y = (f-c*d/a)/(e-b*d/a)
                x = (c - b*y)/a
            else:
                print("cannot solve equation")
        else:
            if b!=0:
                y = c/b
                if d!=0:
                    x = (f -e*y)/d
                else:
                    print("cannot solve equation")
                
        
        print("{:.3f} {:.3f}".format(x,y))

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

Python: import sys

for line in sys.stdin:
    a,b,c,d,e,f = [float(w) for w in line.split()]
    
    print("{:.3f} {:.3f}".format((e*c-b*f)/(a*e-a*b), (d*c-a*f)/(b*d-a*e)))

Python: # -*- coding:utf-8 -*-
 
def main():
    while True:
        try:
            IN=input()
            val=IN.split(" ")
        except:
            break
        a=int(val[0])
        b=int(val[1])
        c=int(val[2])
        d=int(val[3])
        e=int(val[4])
        f=int(val[5])

        x=round(float((c*e-b*f)/(a*e-b*d)),3)
        y=round(float((c*d-a*f)/(b*d-a*e)),3)

        print(x,y)

Python: EPS = 0.0001
while True:
    try:
        a = list(map(float, input().split()))
        dd = a[0]*a[4]-a[3]*a[1]
        d1 = a[2]*a[4]-a[5]*a[1]
        d2 = a[0]*a[5]-a[3]*a[2]
        print("{0:.3f} {1:.3f}".format(d1/dd+EPS, d2/dd+EPS))
    except EOFError:
        break

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

Python: k=[]
try:
  while True:
    k.append(list(map(int,input().split())))
except EOFError:
  pass
for a,b,c,d,e,f in k:
  if f*b-c*e==0:
    x=0
  else:
    x=(f*b-c*e)/(b*d-a*e)

  if f*a-c*d==0:
    y=0
  else:
    y=(f*a-c*d)/(a*e-b*d)
  
  print("%.3f %.3f" % (x,y))

Python: import sys

a = []

for line in sys.stdin:
    a.append(line)

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

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

	print('{:.3f} {:.3f}'.format(round(x,3)+0.0,round(y,3)+0.0))

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