Go: package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"strconv"
)

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Split(bufio.ScanWords)
	for {
		data := nextInts(6)
		if data[0] == 0 || data[1] == 0 || data[2] == 0 || data[3] == 0 || data[4] == 0 || data[5] == 0 {
			break
		}
		fmt.Printf("%.3f\n", Round(GetX(data[0], data[1], data[2], data[3], data[4], data[5]), 3))
		fmt.Printf("%.3f\n", Round(GetY(data[0], data[1], data[2], data[3], data[4], data[5]), 3))
	}
}

func GetX(a, b, c, d, e, f float64) float64 {
	return ((c * e) - (b * f)) / ((a * e) - (b * d))
}

func GetY(a, b, c, d, e, f float64) float64 {
	return ((c * d) - (a * f)) / ((b * d) - (a * e))
}

func Round(f float64, places int) float64 {
	shift := math.Pow(10, float64(places))
	return math.Floor(f*shift+.5) / shift
}

func next() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() float64 {
	a, _ := strconv.Atoi(next())
	return float64(a)
}

func nextInts(n int) []float64 {
	a := make([]float64, n)
	for i := 0; i < n; i++ {
		a[i] = nextInt()
	}
	return a
}

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

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 sys

if __name__ == "__main__":

    for line in sys.stdin:
        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)))
    pass

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

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

Python: 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('%.3f %.3f' % (round(x,3), round(y,3)))

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)
        if(x == 0):
            x = 0
        if(y == 0):
            y = 0

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