Go: package main

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

func main() {
        var a, b, c, d, e, f float64
        sc := bufio.NewScanner(os.Stdin)
        for sc.Scan() {
                fmt.Sscanf(sc.Text(), "%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f)

                det := a*e - b*d
                x := (e*c - b*f) / det
                y := (a*f - c*d) / det
                if x == 0.0 {
                        x = math.Abs(x)
                }
                if y == 0.0 {
                        y = math.Abs(y)
                }
                fmt.Printf("%.3f %.3f\n", x, y)
        }
}

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

  det = a * e - b * d
  if det != 0:
    x = (1 / det) * (e * c - b * f)
    y = (1 / det) * (a * f - c * d)
    if x >= 0:
      xx = (int)(x * 1000)
      if xx % 10 <= 4:
        ansx = (xx - xx%10) / 1000
      else:
        ansx = (xx + (10 - xx%10)) / 1000
    else:
      xx = (int)(x * -1000)
      if xx % 10 <= 4:
        ansx = (xx - xx%10) / -1000
      else:
        ansx = (xx + (10 - xx%10)) / -1000
      
    if y >= 0:
      yy = (int)(y * 1000)
      if yy % 10 <= 4:
        ansy = (yy - yy%10) / 1000
      else:
        ansy = (yy + (10 - yy%10)) / 1000
    else:
      yy = (int)(y * -1000)
      if yy % 10 <= 4:
        ansy = (yy - yy%10) / -1000
      else:
        ansy = (yy + (10 - yy%10)) / -1000
    print("{0:.3f} {1:.3f}".format(ansx, ansy))

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([c,f]))[1]]
        print(x,y)
    except EOFError:
        break

Python: import numpy as np
while True:
    try:
        a,b,c,d,e,f = map(int, input().split())
        ls1 = [[a,b],[d,e]]
        ls2 = [c,f]
        x,y = np.linalg.solve(ls1,ls2)
        print("{0:.4f} {1:.4f}".format(x,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,3), round(y,3)))
    except:
        break

Python: import sys
from decimal import Decimal

def main():

    input_strings = sys.stdin.readlines()
    for coef_and_cons in input_strings:
        a, b, c, d ,e, f = map(Decimal, coef_and_cons.split())
        x = (f/e - c/b) / (d/e - a/b)
        y = (f/d - c/a) / (e/d - b/a)
        print('%.3f %.3f' %  (x.quantize(Decimal('0.001'), rounding='ROUND_HALF_DOWN'),
                              y.quantize(Decimal('0.001'), rounding='ROUND_HALF_DOWN') )
             )


main()

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

Python: import sys
from fractions import Fraction

def main():

    input_strings = sys.stdin.readlines()
    for matrix_string in input_strings:
        matrix = list(map(Fraction, list(matrix_string.split())))
        if matrix[0] == 0:
            matrix = matrix[3:] + matrix[:3]
        matrix = list(map(lambda x: x / matrix[0], matrix[:3])) + matrix[3:]
        matrix = matrix[:3] + list(map(lambda x: x[1] - matrix[3] * x[0], zip(matrix[:3], matrix[3:])))
        matrix = matrix[:3] + list(map(lambda x: x / matrix[4], matrix[3:]))
        matrix = list(map(lambda x: x[0] - matrix[1] * x[1], zip(matrix[:3], matrix[3:]))) + matrix[3:]
        matrix = list(map(int, matrix))
        print('%.3f %.3f' % (matrix[2], matrix[5]))


main()

Python: import string
import sys
import math

#??????????????\????????????ip?????\??????
ip = sys.stdin.readlines()
ip_list = {}

#?????????????????§?????????
for i in range(len(ip)):
    ip_list[i] = ip[i].strip("\n").split()
    x = int( float( int(ip_list[i][2])*int(ip_list[i][4]) - int(ip_list[i][1])*int(ip_list[i][5]) ) / float( int(ip_list[i][0])*int(ip_list[i][4]) - int(ip_list[i][1])*int(ip_list[i][3]) ))
    y = int( float( int(ip_list[i][2])*int(ip_list[i][3]) - int(ip_list[i][0])*int(ip_list[i][5]) ) / float( int(ip_list[i][1])*int(ip_list[i][3]) - int(ip_list[i][0])*int(ip_list[i][4]) ))
    
    x = ('%.3f' % x)
    y = ('%.3f' % y)
    print(str(x)+" "+str(y))

Python: r = [0 for i in range(4)]
for i in range(0, 4, 2):
    a, b, c, d, e, f = map(int, input().split(" "))
    detA = a * e - b * d
    r[i] = (c * e - b * f) / detA
    r[i + 1] = (a * f - c * d) / detA

for i in range(0, 4, 2):
    print("{:.3f} {:.3f}".format(r[i], r[i + 1]))

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

Python: import fileinput

for line in fileinput.input():
    v = [int(i) for i in line.split(" ")]
    x = (v[2] * v[4] - v[1] * v[5]) / (v[0] * v[4] - v[1] * v[3])
    y = (v[2] * v[3] - v[0] * v[5]) / (v[1] * v[3] - v[0] * v[4])
    print("%.3f" % x, "%.3f" % y)

Python: # AOJ 0004 Simultaneous Equation
# Python3 2018.6.9 bal4u

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: t = 0
while t == 0:	
	try:
		a,b,e,c,d,f = [int(i) for i in input().split()]
	except:
		break
	else:
		x = (d*e - b*f) / (a*d - b*c) + 0
		y = (a*f - c*e) / (a*d - b*c) + 0
		print("{0:.3f}".format(x) + " " + "{0:.3f}".format(y))

Python: def main():
    def get_inputs():
        li = []
        try:
            while True:
                li.append(input())
        except EOFError:
            return li

    def my_round(num, ndigits=3):
        num = num * 10**ndigits
        num = (num*2 + 1)//2
        num = num / 10**ndigits
        num = "{0:.3f}".format(num) ##
        return num

    li = get_inputs()
    for str_num in li:
        tmp = str_num.split(" ")
        for i in range(len(tmp)):
            tmp[i] = int(tmp[i])
        a,b,c,d,e,f = tmp[0],tmp[1],tmp[2],tmp[3],tmp[4],tmp[5]
        x = (c*e - b*f) / (a*e - b*d)
        x = my_round(x)
        y = (c*d - a*f) / (b*d - a*e)
        y = my_round(y)
        print("{} {}".format(x,y))
    return None


if __name__ == '__main__':
    main()

Python: (a,b,c,d,e,f)  =  map(int,input().split())
g = (a * e)  - (b * d)
ans1= "{0:.3f}".format((( e * c) + ( -b * f)) / g)
ans2= "{0:.3f}".format(((-d * c) + (  a * f)) / g)
(a,b,c,d,e,f)  =  map(int,input().split())
g = (a * e)  - (b * d)
ans3= "{0:.3f}".format((( e * c) + ( -b * f)) / g)
ans4= "{0:.3f}".format(((-d * c) + (  a * f)) / g)
print (ans1,ans2)
print (ans3,ans4)

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

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/0.0001))
              
    except EOFError: break

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