Go: package main

import "fmt"

func main() {
	var resultX, resultY [100]float32
	var count int
	for {
		var a, b, c, d, e, f, x, y float32
		fmt.Scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f)
		if a == 0 {
			break
		}
		//Simultaneous equation
		y = (((a * f) - (d * c)) / ((a * e) - (b * d)))
		x = ((c - (b * y)) / a)
		resultX[count] = x
		resultY[count] = y
		count++
	}
	for i := 0; i < count; i++ {
		fmt.Printf("%.3f %.3f\n", resultX[i], resultY[i])
	}
}

Python: # Vol0004.
import sys

def main():
    data = []
    lines = sys.stdin.readlines()

    for line in lines:
        data.append(line.split())  # スペース区切りで放り込む
    # ax + by = c, dx + ey = fの解は、
    # x = (ce - bf) / (ae - bd), y = (af - cd) / (ae - bd).
    # これをround(float, 3)すれば答えが出る。
    N = len(data)
    for i in range(N):
        for k in range(6):
            data[i][k] = int(data[i][k])
        det = data[i][0] * data[i][4] - data[i][1] * data[i][3]
        gx = data[i][2] * data[i][4] - data[i][1] * data[i][5]
        gy = data[i][0] * data[i][5] - data[i][2] * data[i][3]
        print(str(round(gx / det, 3)) + " " + str(round(gy / det, 3)))

if __name__ == "__main__":
    main()

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

Python: import sys

for line in sys.stdin:
    a,b,c,d,e,f=list(map(int,input().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: import numpy as np

Python: # coding: utf-8

while True:
	try:
		data = map(int, raw_input().split())
		a = data[0]
		b = data[1]
		c = data[2]
		d = data[3]
		e = data[4]
		f = data[5]

		x = (c*e-b*f)*1.0 / (a*e-b*d)
		if x == -0.000:
			x = 0.000
		if b != 0:
			y = (c-a*x)/b
		else:
			y = (f-d*x)/e
		if y == -0.000:
			y = 0.000

		print("{:.3f} {:.3f}".format(x,y))
	except EOFError:
		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
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)))

Python: inputs = list(input())
print(inputs)

Python: while True:
    try:
        L=list(map(int,input().split()))
        x=L[0]*L[4]-L[3]*L[1]
        y=L[2]*L[4]-L[5]*L[1]
        z=y/x+0
        w=(L[2]-L[0]*z)/L[1]+0
        print(f"{z:.3f} {w:.3f}")
    except EOFError:
        break

Python: while True:
    try:
        a, b, c, d, e, f = map(int, input().strip("\n").split(" "))
        z = a * e - b * d
        if z == 0:
            break
        x = (c * e - b * f)
        y = (f * a - c * d)
        x /= z
        y /= z
        # zero toshite atsukau
        if -0.0004 < x < 0.0004:
            x = abs(x)
        if -0.0004 < y < 0.0004:
            y = abs(y)
        print("{0:.3f} {1:.3f}".format(x, y))

    except EOFError:
        break  # escape from while loop

Python: import sys
for line in sys.stdin:
    a,b,c,d,e,f = list(map(int, line.split()))
    y = (f-(d*c)/a)/((a*e-d*b)/a)
    x = (c-b*y)/a
    print('%03.3f' % x,'%03.3f' % y)

Python: import sys

for line in sys.stdin:
    array = [int(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("%f %f" % (x,y))

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

Python: while True:
    try:
        a, b, c, d, e, f = map(int, input().split())
        tb, tc = d*b, d*c
        te, tf = a*e, a*f
        y = (tc-tf)/(tb-te)
        x = (c-(y*b))/a
        print("{0:.3f} {1:.3f}".format(x, y))

    except:
        break

Python: # Aizu Problem 0004: Simultaneous Equation
#
import sys, math, os

# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
    sys.stdin = open("sample-input2.txt", "rt")


for line in sys.stdin:
    a, b, c, d, e, f = [int(_) for _ in line.split()]
    det = a * e - b * d
    det1 = c * e - b * f
    det2 = a * f - c * d
    #x = str(round(det1 / det, 3))
    #y = str(round(det2 / det, 3))
    x = det1 / det + 0
    y = det2 / det + 0
    #if -.001 < x < 0:
    #    x = 0
    print("%.3f %.3f" % (x, y))

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: # coding: utf-8
# Your code here!

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

Python: import numpy as np

while 1:
    try:
        a = list(map(float, input().split()))
        A = np.array([[a[0],a[1]],
                      [a[3],a[4]]])
        b = np.array([a[2],a[5]])
        x = np.linalg.solve(A, b)
        print(x)
    except EOFError:
        break

Python: import numpy
#while True:
#   try:
#        a,b,c,d,e,f = (int(i) for i in input().split())
#        x,y = [numpy.dot(numpy.linalg.inv(numpy.array([[a,b],[d,e]])),numpy.array([c,f]))[0],numpy.dot(numpy.linalg.inv(numpy.array([[a,b],[d,e]])),numpy.array([c,f]))[1]]
#        print("{0:.3f} {1:.3f}".format(x,y))
#    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[4]-l[5]*l[1])/(l[0]*l[4]-l[3]*l[1])
    
    print("{:.3f} {:.3f} ".format(x,y))

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