Go: package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	var strs []string
	var a, b, c, d, e, f float64
	var x, y float64
	for scanner.Scan() {
		strs = strings.Split(scanner.Text(), " ")
		_a, _ := strconv.Atoi(strs[0])
		_b, _ := strconv.Atoi(strs[1])
		_c, _ := strconv.Atoi(strs[2])
		_d, _ := strconv.Atoi(strs[3])
		_e, _ := strconv.Atoi(strs[4])
		_f, _ := strconv.Atoi(strs[5])
		a = float64(_a)
		b = float64(_b)
		c = float64(_c)
		d = float64(_d)
		e = float64(_e)
		f = float64(_f)
		y = (c*d - f*a) / (d*b - a*e)
		x = (c - b*y) / a

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

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

Python: from decimal import Decimal

def main():
    input_line = raw_input()
    x1 = int(input_line.split(' ')[0])
    y1 = int(input_line.split(' ')[1])
    p = int(input_line.split(' ')[2])
    x2 = int(input_line.split(' ')[3])
    y2 = int(input_line.split(' ')[4])
    q = int(input_line.split(' ')[5])
    multiplicand1, multiplicand2 = calculate1(x1, x2)
    after_y1, after_y2, after_p, after_q = calculate2(y1, y2, p, q, multiplicand1, multiplicand2)
    calculate3(after_y1, after_y2, after_p, after_q, x1, y1, p)
    
def calculate1(x1, x2):
    if (x1 >= 0 and x2 >= 0) or (x1 < 0 and x2 < 0):
        multiplicand1 = -x2
        multiplicand2 = x1
        return multiplicand1, multiplicand2
    else:
        multiplicand1 = abs(x2)
        multiplicand2 = abs(x1)
        return multiplicand1, multiplicand2
    
def calculate2(y1, y2, p, q, multiplicand1, multiplicand2):
    after_y1 = y1 * multiplicand1
    after_y2 = y2 * multiplicand2
    after_p = p * multiplicand1
    after_q = q * multiplicand2
    return after_y1, after_y2, after_p, after_q

def calculate3(after_y1, after_y2, after_p, after_q, x1, y1, p):
    y = Decimal(after_p + after_q) / Decimal(after_y1 + after_y2)
    x = Decimal(p - y1 * y) / Decimal(x1)
    print('%.4f %.4f' % (x, y))
    
if __name__ == '__main__':
    main()

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: #連立方程式 標準機能のみで
import numpy as np

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

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

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

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: # coding: utf-8
# Your code here!
import numpy as np
while True:
    try:
        a,b,c,d,e,f = map(int, input().split())
        x,y=map(float,np.dot(np.linalg.inv(np.array([a,b,d,e]).reshape(2,2)),np.array([c,f])))
        print('%.3f %.3f' % (x,y))
    except:
        break

Python: import sys

for line in sys.stdin:
    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))

Python: from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
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 - c*d) / (a*e - b*d)
      if x==-0:
         x=int(x)
      if y==-0:
         y=int(y)
      X = Decimal(x).quantize(Decimal('0.001'), rounding=ROUND_HALF_UP)
      Y = Decimal(y).quantize(Decimal('0.001'), rounding=ROUND_HALF_UP)
      print(f'{X:.3f} {Y:.3f}')
   except EOFError:
      break

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

Python: x = int(0)
y = int(0)

while 1:
	try:
		data = raw_input().split()

		a = float(data[0])
		b = float(data[1])
		c = float(data[2])
		d = float(data[3])
		e = float(data[4])
		f = float(data[5])

		# a*x + b*y = c
		# d*x + e*y = f

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

		print(float(format(x, '.3f')))
		print(float(format(y, '.3f')))

	except:
		break

Python: print('hello')

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("%.3f %.3f"%((c-b*y)/a,y))

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

Python: [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(j) for j in i.split()]]

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

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

Python: try:
    while 1:
        a, b, c, d, e, f = list(map(int, input().split()))
        s = (a*e-b*d)
        x = e * c - b * f
        y = -c * d + a * f

        print(x/s, y/s)
except:
    pass

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

Python: def main():
	import sys

	w = []

	for line in sys.stdin:
		w = list(map(float, line.split()))
		solve(w)

def solve(w):
	x = (w[2]*w[4]-w[1]*w[5]) / (w[0]*w[4]-w[1]*w[3])
	y = (w[2]*w[3]-w[0]*w[5]) / (w[1]*w[3]-w[0]*w[4])
	x = round(x, 3)
	y = round(y, 3)
	if x == -0.0:
		x = 0.0
	if y == -0.0:
		y = 0.0
	print('{0:.3f} {1:.3f}'.format(x, y))

if __name__ == '__main__':
	main()

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+0,y/base+0))