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: while True:
  try:
    a, b, c, d, e, f = map(int, input(). split())
    D = (a * e) - (b * d)
    x = (e * c) - (b * f)
    y = (a * f) - (d * c)
    x /= D
    y /= D
    if x / D == 0:
      x = 0
    if y / D == 0:
      y = 0
    print("%.3f %.3f" % (round(x, 3), round(y, 3)))
  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)
 print(f'{(c-b*y)/a} {y}')

Python: import sys
for i in sys.stdin:
    a, b, c, d, e, f = map(int, i.split())
    x = (c * e - b * f) / (a * e - b * d)
    x = abs(x) if x < 10e-4 else x
    print("{:.3f} {:.3f}".format(x, (c - x) / b))

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: def equation(a,b,c,d,e,f,x):
    buff = a*e-b*d
    buff_a = a

    a = e/buff
    b = -b/buff
    d = -d/buff
    e = buff_a/buff

    x.append((a*c)+(b*f))
    x.append((d*c)+(e*f))

count = 0
a = []
b = []
c = []
d = []
e = []
f = []

while True:
    try:
        buff = input().split()
        a.append(float(buff[0]))
        b.append(float(buff[1]))
        c.append(float(buff[2]))  
        d.append(float(buff[3]))
        e.append(float(buff[4]))
        f.append(float(buff[5]))
        count += 1
    except:
        break

for i in range(count):
    ans = []

    equation(a[i],b[i],c[i],d[i],e[i],f[i],ans)
    print('{:.4f}'.format(ans[0]),'{:.4f}'.format(ans[1]))

Python: import sys
import numpy
for i in sys.stdin:
    a, b, c, d, e, f = map(int, i.split())
    x = (c * e - b * f) / (a * e - b * d)
    x = abs(x) if x < 10e-4 else x
    print("{:.3f} {:.3f}".format(x, (c - x) / b))

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

Python: print('ok')

Python: # -*- coding: utf-8 -*-

import sys
import os

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

    delta = a * e - b * d
    x = 1 / delta * (e * c - b * f)
    y = 1 / delta * (-d * c + a * f)
    print(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)
        if x==0:
            x=0
        if y==0:
            y=0
        x=round(x,3)
        y=round(y,3)
        print("{0:.3f}".format(x),"{0:.3f}".format(y))
except EOFError:
    pass

Python: for i in range(2):
    a,b,c,d,e,f = map(int,input().split(' '))
    print('{:.3f}'.format(round((c*e-b*f)/(b*d-a*e),3)),'{:.3f}'.format(round((c*e-b*f)/(b*d-a*e),3)))

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

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

Python: # -*- coding:utf-8 -*-
 
def main():
    while True:
        try:
            IN=input()
            if IN=="":
                raise EOFError
            else:
                val=IN.split(" ")
                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)
                
        except EOFError:
            break
  
if __name__ == '__main__':
    main()

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

Python: while True:
    try:
        a, b, c, d, e, f = [float(x) for x in input().split()]
    except:
        exit()
    m = [[a,b,c],[d,e,f]]
    row = len(m)
    col = len(m[0])
    for k in range(row):
        for j in range(k+1,col):
            m[k][j] /=m[k][k]
        for i in range(row):
            if(i != k):
                for j in range(k+1,col):
                    m[i][j] -= m[i][k] * m[k][j]
    print ("%.3f %.3f" % (m[0][2],m[1][2]))

Python: import sys
import math

r = sys.stdin.readlines()

#r.pop(0)

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

for line in sys.stdin:
    try:
        a,b,c,d,e,f = map(float, line.rstrip().split(' '))
        x = round((b*f-c*e)/(b*d-a*e), 3)
        y = round((a*f-d*c)/(a*e-b*d), 3)
        print("{:.3f} {:.3f}".format(x,y))
    except:
        break

Python: aaa

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

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

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

Python: import sys


def det(mat):
  t = 1 / (mat[0][0] * mat[1][1] - mat[0][1] * mat[1][0])
  a = t * mat[1][1]
  b = t * -1 * mat[0][1]
  c = t * -1 * mat[1][0]
  d = t * mat[0][0]
  return [[a, b], [c, d]]


for line in sys.stdin:
  try:
    a, b, c, d, e, f = [int(i) for i in line.split()]
    A = [[a, b], [d, e]]
    P = [c, f]
    detA = det(A)
    print("%lf %lf" % (detA[0][0] * P[0] + detA[0][1] * P[1], detA[1][0] * P[0] + detA[1][1] * P[1]))
  except:
    break

Python: import numpy as np

a,b,c,d,e,f = list(map(int,input().split()))
a,b,c,d,e,f = int(a),int(b),int(c),int (d),int(e),int(f)

A = np.matrix([
[a, b],
[d, e]
])
Y = np.matrix([
[c],
[f]
])
result = np.linalg.inv(A)*Y
print('{:.3f}'.format(float(result[0])), '{:.3f}'.format(float(result[1])))

Python: import sys
for line in sys.stdin.readlines():
    a, b, c, d, e, f = [float(x) for x in line.split()]
    if a!=0 and d!=0:
        a, b, c = [x/a for x in [a, b, c]]
        d, e, f = [x/d for x in [d, e, f]]
        y = (c-f) / (b-e)
        x = c - b * y

    else:
        a, b, c = [x/b for x in [a, b, c]]
        d, e, f = [x/e for x in [d, e, f]]
        x = (c-f) / (a-d)
        y = c - a * x
    print(f'{x:.3f} {y:.3f}')

Python: # -*-coding:utf-8

import numpy as np

def main():

    line = input()
    tokens = list(map(float, line.strip().split()))

    A = np.array([[tokens[0],tokens[1]] ,[tokens[3],tokens[4]]])
    B = np.array([tokens[2],tokens[5]])

    X = np.linalg.solve(A, B)

    for i in range(2):
        if X[i] == -0.000:
            X[i] = abs(X[i])

    print( '%.3f %0.3f' % (X[0], X[1]) )

    return 0

if __name__ == '__main__':
    for i in range(2):
        main()

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 :
            y = 0
            
        print(f"{x:.3f} {y:.3f}")
        
    except :
        break