Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	sc.Split(bufio.ScanWords)
	for {
		data := nextInts(6)
		fmt.Printf("%.3f\n", Round(GetX(data[0], data[1], data[2], data[3], data[4], data[5]), 3))
		fmt.Printf("%.3f\n", Round(GetY(data[0], data[1], data[2], data[3], data[4], data[5]), 3))
	}
}

func GetX(a, b, c, d, e, f float64) float64 {
	return ((c * e) - (b * f)) / ((a * e) - (b * d))
}

func GetY(a, b, c, d, e, f float64) float64 {
	return ((c * d) - (a * f)) / ((b * d) - (a * e))
}

func Round(f float64, places int) float64 {
	shift := math.Pow(10, float64(places))
	return math.Floor(f*shift+.5) / shift
}

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

func nextInt() float64 {
	a, _ := strconv.Atoi(next())
	return float64(a)
}

func nextInts(n int) []float64 {
	a := make([]float64, n)
	for i := 0; i < n; i++ {
		a[i] = nextInt()
	}
	return a
}

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:
    try:
        a, b, c, d, e, f = map(int, input().split())
        tb, tc = d*b, d*c
        te, tf = a*e, a*f
        y = (tc-tf)/(tb-te)
        x = (c-(y*b))/a
        print("{0:.3f} {1:.3f}".format(x, y))

    except:
        break

Python: # Aizu Problem 0004: Simultaneous Equation
#
import sys, math, os

# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
    sys.stdin = open("sample-input2.txt", "rt")


for line in sys.stdin:
    a, b, c, d, e, f = [int(_) for _ in line.split()]
    det = a * e - b * d
    det1 = c * e - b * f
    det2 = a * f - c * d
    #x = str(round(det1 / det, 3))
    #y = str(round(det2 / det, 3))
    x = det1 / det + 0
    y = det2 / det + 0
    #if -.001 < x < 0:
    #    x = 0
    print("%.3f %.3f" % (x, y))

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

Python: # coding: utf-8
# Your code here!

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

Python: import numpy as np

while 1:
    try:
        a = list(map(float, input().split()))
        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)
    except EOFError:
        break

Python: import numpy
#while True:
#   try:
#        a,b,c,d,e,f = (int(i) for i in input().split())
#        x,y = [numpy.dot(numpy.linalg.inv(numpy.array([[a,b],[d,e]])),numpy.array([c,f]))[0],numpy.dot(numpy.linalg.inv(numpy.array([[a,b],[d,e]])),numpy.array([c,f]))[1]]
#        print("{0:.3f} {1:.3f}".format(x,y))
#    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[4]-l[5]*l[1])/(l[0]*l[4]-l[3]*l[1])
    
    print("{:.3f} {:.3f} ".format(x,y))

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

Python: # coding:utf-8
import sys

def determination(ls):
    return ls[0][0]*ls[1][1]-ls[0][1]*ls[1][0]

def inversion(ls):
    ret = []
    tmp = [x for x in ls]
    det = determination(tmp)
    
    if det == 0:
        return False
    else:
        tmp[0][0], tmp[1][1] = tmp[1][1], tmp[0][0]
        tmp[0][1] = tmp[0][1]*(-1)
        tmp[1][0] = tmp[1][0]*(-1)

    for x in tmp:
        ret.append(list(map(lambda x:x/det, x)))

    return ret

def dot(a,b):
    ret = []
    
    for x in a:
        ret.append(x[0]*b[0] + x[1]*b[1])

    return ret

def simueq(a,b):
    return dot(inversion(a), b)

def main():

    for line in sys.stdin:
        ls = list(map(int, line.split(' ')))
        a = [[ls[0], ls[1]], [ls[3], ls[4]]]
        b = [ls[2], ls[5]]
        
        answer = simueq(a,b)
        print('%.3f' % round(answer[0],3), '%.3f' % round(answer[1],3))
    
if __name__ == "__main__":
    main()

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)
        x = round(1000*x)/1000
        y = round(1000*y)/1000
        print ("%.3f %.3f" % (x, y))
    except:
        break

Python: # coding: utf-8
# Your code here!

b=0.0001
while True:
    try:
        a=list(map(float,input().split()))
        x=(a[2]*a[4]-a[1]*a[5])/(a[0]*a[4]-a[1]*a[3])
        y=(a[2]*a[3]-a[0]*a[5])/(a[1]*a[3]-a[0]*a[4])
        print("{0:.3f} {1:.03f}".format(x+b,y+b))
    except EOFError:
        break

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

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

Python: import numpy as np
while True:
    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: import sys
[[print("{0:.3f} {1:.3f}".format(round((t[2] - t[1] * (t[0] * t[5] - t[2] * t[3]) / (t[0] * t[4] - t[1] * t[3])) / t[0], 3), round((t[0] * t[5] - t[2] * t[3]) / (t[0] * t[4] - t[1] * t[3]), 3))) for t in [[int(y) for y in x.split()]]] for x in sys.stdin]

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

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: a, b, c, d, e, f = map(float, raw_input().split())

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

print ("{:.4f} {:.4f}".format(x + 0, y + 0))

Python: from sys import stdin

def deal(x):
    if abs(x) < 1e-6: return 0
    else: return x

def solve(a, b, c, d, e, f):
    x = 0
    y = 0
    if b == 0:
        x = c / a
        y = (f - d * x) / e
    else:
        x = (b * f - e * c) / (b * d - e * a)
        y = (c - a * x) / b
    
    p = [deal(x), deal(y)]
    return p

for s in stdin:
    s = s[:-1]
    s = map(float, s.split())
    p = solve(s[0], s[1], s[2], s[3], s[4], s[5])
    print ("%.3f "%p[0] + "%.3f"%p[1])

Python: while True:
	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 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" %(x, y))