Go: package main

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

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
                fmt.Printf("%04f %04f\n", x, y)
        }
}

Python: import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()


class Matrix():
    def __init__(self, A):
        self.A = A
        self.row = len(A)
        self.col = len(A[0])

    def __iter__(self):
        return self.A.__iter__()

    def __getitem__(self, i):
        return self.A.__getitem__(i)

    def __add__(self, B):
        aa = self.A
        bb = B.A
        return Matrix([[aa[i][j] + bb[i][j] for j in range(self.col)] for i in range(self.row)])

    def __sub__(self, B):
        aa = self.A
        bb = B.A
        return Matrix([[aa[i][j] - bb[i][j] for j in range(self.col)] for i in range(self.row)])

    def __mul__(self, B):
        aa = self.A
        bb = B.A
        a = []
        for i in range(self.row):
            ai = aa[i]
            r = []
            for j in range(B.col):
                r.append(sum([ai[k] * bb[k][j] for k in range(self.col)]))
            a.append(r)
        return Matrix(a)

    def __truediv__(self, x):
        pass

    def lu(self):
        size = self.row
        T = copy.deepcopy(self.A)
        L = [[0]*size for _ in range(size)]
        U = [[0]*size for _ in range(size)]
        for i in range(size):
            for j in range(i,size):
                L[j][i] = T[j][i]
            for j in range(i,size):
                U[i][j] = T[i][j] / T[i][i]
            for j in range(i+1,size):
                for k in range(i+1,size):
                    T[j][k] -= L[j][i] * U[i][k]

        return Matrix(L),Matrix(U)

    def __str__(self):
        return self.A.__str__()

def solve_se(A, b):
    n = A.row
    L,U = A.lu()
    y = []
    for i in range(n):
        t = b[i]
        for k in range(i):
            t -= L[i][k] * y[k]
        y.append(t / L[i][i])

    x = [0] * n
    for i in range(n-1,-1,-1):
        t = y[i]
        for k in range(i+1,n):
            t -= U[i][k] * x[k]
        x[i] = t
    return x


def main():
    sa = [s for s in sys.stdin.read().split('\n') if s]
    r = []
    for s in sa:
        a,b,c,d,e,f = [int(c) for c in s.split()]
        A = Matrix([[a,b],[d,e]])
        B = [c,f]
        x = solve_se(A,B)
        r.append(' '.join(map(lambda t: '{:01.3f}'.format(t), x)))

    return '\n'.join(r) + '\n'

print(main())

Python: def mul4(v1, v2, v3, v4):
    return (v1 * v2) - (v3 * v4)

for d in [input().split() for _ in range(2)]:
    a, b, e, c, d, f = tuple(map(float, d))
    det = mul4(a, d, c, b)
    print("{:.3f} {:.3f}".format(
        mul4(d, e, b, f) / det or 0.0,
        -mul4(c, e, a, f) / det or 0.0)
    )

Python: import sys

def simeq(a,b,c,d,e,f):
    return ((c*e-b*f)/(a*e-b*d),((a*f-c*d)/(a*e-b*d)))

if __name__ == '__main__':
    for line in sys.stdin:
        (a,b,c,d,e,f) = map(int,line.split())
        (x,y) = simeq(a,b,c,d,e,f)
        print("{:.3f} {:.3f}".format(x,y))

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

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: try:
    while True:
        a,b,c,d,e,f = map(float,input().split())
        if  a - d == 0:
            y = (c - f) / (b - e)
            x = (c - b*y) / a
        else:
            A = a*d
            D = d*a
            B = b*d
            C = c*d
            E = e*a
            F = f*a
            if C < F :
                y = (C - F) / (B - E)
                x = (c - b*y) / a
            else: 
                y = (F - C) / (E - B)
                x = (c - b*y) / a
        
        print(f'{round(x,3):.03f}',f'{round(y,3):.03f}')
        
except EOFError:
    pass

Python: import sys
[print("{0:.3f} {1:.3f}".format((k[2] - k[1] * ((k[0] * k[5] - k[2] * k[3]) / (k[0] * k[4] - k[1] * k[3]))) / k[0], ((k[0] * k[5] - k[2] * k[3]) / (k[0] * k[4] - k[1] * k[3])))) for i in sys.stdin for k in [[int(float(j)) for j in i.split()]]]

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

Python: import sys

for s in list(sys.stdin):
    a,b,e,c,d,f = map(float,s.split())
    base = a*d-b*c
    x = e*d-b*f
    y = a*f-e*c
    print('%.3f %.3f' % (x/base+0,y/base+0))

Python: def gcd(a,b):
 if b==0:
  return a
 return gcd(b,a%b)

while True:
 try:
  a,b=[int(i) for i in input().split()]
  print(gcd(a,b),a*b/gcd(a,b))
 except EOFError:
  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:
            y=0
        print(f"{x:.3f} {y:.3f}")
    except:
        break

Python: def main():
    p = [float(x) for x in input().split()]
    x = (p[4]*p[2]-p[1]*p[5])/(p[0]*p[4]-p[1]*p[3])
    y = (p[2]-p[0]*x)/p[1]
    if abs(x)<1e-4:
        x=0.0
    if abs(y)<1e-4:
        y=0.0
    print("%.3f %.3f"%(x,y))

main()

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

#testWriteFile()
SimultaneousEquation()

Python: # coding: utf-8
# Here your code !

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])+0
    
    x = (l[2]*l[4]-l[5]*l[1])/(l[0]*l[4]-l[3]*l[1])+0
    
    print("{:.3f} {:.3f} ".format(x,y))

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

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)
    y = (c * d - a * f) / (b * d - a * e)
    x = abs(x) if x < 10e-4 else x
    y = abs(y) if y < 10e-4 else y
    print("{:.3f} {:.3f}".format(x, y))

Python: while 1:
    try:
        a,b,c,d,e,f=[int(i) for i in input().split()]

        y=float((c*d-f*a)/(b*d-e*a))
        x=float((c-b*y)/a)
        print("{0:.3f}".format(x),"{0:.3f}".format(y))
    except EOFError:
        break

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