Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextFloat64() (float64, error) {
	return strconv.ParseFloat(nextString(), 64)
}

func mathRound(f float64) float64 {
	return math.Floor(f + .5)
}

func round(x float64) float64 {
	if math.Abs(x) < 0.001 {
		return 0
	}
	return mathRound(x*1000) / 1000
}

func main() {
	scanner.Split(bufio.ScanWords)
	for {
		a, err := nextFloat64()
		if err != nil {
			break
		}
		b, _ := nextFloat64()
		c, _ := nextFloat64()
		d, _ := nextFloat64()
		e, _ := nextFloat64()
		f, _ := nextFloat64()

		detA := a*e - b*d
		x := (c*e - b*f) / detA
		y := (a*f - c*d) / detA

		fmt.Printf("%.3f %.3f\n", round(x), round(y))
	}
}

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

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:
  (a,b,c,d,e,f)  =  map(int,input().split())
  g = (a * e)  - (b * d)
  ans= "{0:.3f}".format((( e * c) + ( -b * f)) / g + 0)
  print (ans)

Python: #!/usr/bin/env python
# -*- coding: utf-8 -*-

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

Python: import math
while True:
    try:
        line=input()

    except:
        break

    a,b,c,d,e,f=map(int, line.strip().split())

    z=a*e-b*d
    if z==0:
        break

    y=(c*d-f*a)/(b*d-a*e)
    x=(c*e-f*b)/(a*e-b*d)

    print(round(x,3),round(y,3))

Python: import numpy as np

lst=[]
while 1:
    try:
        lst.append(list(map(int, input().split())))
    except EOFError:
        break
for a in lst:
    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)

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

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

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

Python: while(True):
    line = raw_input()
    s = line.rstrip().split()
    for i in range(6):
        s[i] = int(s[i])
    print (s[2]*s[4] - s[1]*s[5])/(s[0]*s[4] - s[1]*s[3]), (s[1]*s[5] - s[3]*s[2]) / (s[0]*s[4] - s[1]*s[3])

Python: print('hello')

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: while True:
    try:
        input_line = input()
        if input_line == '':
            break
        else:
            a, b, c, d, e, f = map(float, input_line.split())
            x = (b*f-c*e) / (b*d-a*e)
            y = (c-a*x)/b
            print("{:.3f} {:.3f}".format(x+0,y+0))
    except:
        break

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

Python: import sys

while 1:
    line = sys.stdin.readline()
    if line is ' ':
        break
    a,b,c,d,e,f = map(float, input().split())  
    y=(c*d-a*f)/(b*d-a*e)
    x=(c-b*y)/a
    print("{0:.3f} {1:.3f}".format(x,y))

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

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: 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(x,y)

Python: import numpy as np
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([3,6]))[1])
    print(x,y)
except EOFError:
    break

Python: from numpy.linalg import solve 

a,b,c,d,e,f=map(int,input(),split())
A=[[1.,2],[4,5]]
B=[3,6]
xy=solve(A,B)
print(xy)

Python: while True:

    try:
        a,b,c,d,e,f = (float(x) for x in 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(format(x, ".3f"), format(y, ".3f"))

    except EOFError:
        break

Python: # ????????£???????¨????????§£???????????°??????
# ax + by = c
# dx + ey = f
import sys

def inverse(a, b, d, e):
    deta = a * e - b * d
    return (deta, e, -b, -d, a)

while True:
    data = sys.stdin.readline()
    if data is None or data.strip() == '':
        break
    data = data.strip().split(' ')
    a, b, c, d, e, f = [float(i) for i in data]

    inv = inverse(a, b, d, e)
    x = (inv[1] * c + inv[2] * f) / inv[0] + 0
    y = (inv[3] * c + inv[4] * f) / inv[0] + 0

    print('%.3f %.3f' % (x, y))

Python: while True:
    try:
        line=input()

    except:
        break

    a,b,c,d,e,f=map(int, line.strip().split())

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