Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

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

func main() {
	sc.Split(bufio.ScanLines)
	for sc.Scan() {
		s := strings.Split(sc.Text(), " ")
		a, _ := strconv.ParseFloat(s[0], 64)
		b, _ := strconv.ParseFloat(s[1], 64)
		c, _ := strconv.ParseFloat(s[2], 64)
		d, _ := strconv.ParseFloat(s[3], 64)
		e, _ := strconv.ParseFloat(s[4], 64)
		f, _ := strconv.ParseFloat(s[5], 64)
		x := ((b * f) - (c * e)) / ((b * d) - (a * e))
		y := ((a * f) - (c * d)) / ((a * e) - (b * d))
		if x == 0 {
			fmt.Printf("0.000 %.3f\n", y)
		} else if y == 0 {
			fmt.Printf("%.3f 0.000\n", x)
		} else {
			fmt.Printf("%.3f %.3f\n", x, y)
		}
	}
}

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]
        if det < 0:
            det = -det;
            if gx != 0: gx = -gx
            if gy != 0: gy = -gy
        print("{0:.3f}".format(gx / det) + " " + "{0:.3f}".format(gy / det))

if __name__ == "__main__":
    main()

# 補足、0.1とか0.22でも3桁目まで表示しないとWrongになる。
# 表示するにはprint("{0:.nf}".format(数))ってやる(nのところは桁数)。
# さらに、0を負の数で割ると表示が-0.000になってしまうのでそこの処理も重要。

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

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: import numpy as np

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

    ume = np.array([a,b,d,e]).reshape(2,2)
    boshi = np.array([c,f]).reshape(2,1)

    answer = np.linalg.inv(ume) @ boshi
    print("%.3f %.3f" % (answer[0,0],answer[1,0]))

  except ValueError:
    break

Python: import itertools
import operator

dataset = []
while True:
    try:
        dataset.append(input())
    except EOFError:
        break

for item in dataset:
    try:
        a, b, c, d, e, f = [int(i) for i in item.split()]
        e = e * (a/d)
        f = f * (a/d)

        y = (c - f)/(b-e)
        x = (c - b*y) / a 
        print("{:.3f} {:.3f}".format(x, y))

    except:
        print("dataset cannot to be converted")

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 ("%f %f" % (round(x,-3), round(y,-3)))
    except:
        break

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

Python: #連立方程式
import numpy as np

def function(a,b,c,d,e,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])))

while True:
    try:
        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)
        function(a,b,c,d,e,f)
    except EOFError:
        break

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):
        # squaren??????
        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: import sys
from math import fabs


if __name__ == '__main__':
    epsilon = 1e-10
    # ??????????????\?????¨???????????????
    for line in sys.stdin:
        a, b, e, c, d, f = [int(x) for x in line.strip().split(' ')]
        x = 1/(a*d-b*c) * (d*e - b*f)
        y = 1/(a*d-b*c) * (-c*e + a*f)
        # ?¨????????????¨?????? -0.0 ???????????´???????????¶?????? 0.0 ?????????
        if fabs(x) < epsilon:
            x = 0.0
        if fabs(y) < epsilon:
            y = 0.0
        print('{0:.3f}, {1:.3f}'.format(x, y))

Python: import sys

for line in sys.stdin:
    ll = [int(x) for x in line.split()]
    #print(ll)
    a = ll[0]
    b = ll[1]
    c = ll[2]
    d = ll[3]
    e = ll[4]
    f = ll[5]

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

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))