Go: package main

import (
  "fmt"
)

func main() {
  var a,b,c,d,e,f float64
  var x,y float64
  for _, err := fmt.Scan(&a, &b, &c, &d, &e, &f); err == nil;
   _, err = fmt.Scan(&a, &b, &c, &d, &e, &f) {
    y = (a*f-c*d)/(a*e-b*d)
    x = (c-b*y)/a
    fmt.Printf("%.3f %.3f\n", x,y)
  }
}

Python: while True:
	try:
		a,b,c,d,e,f = map(float,input().split())
	except:
		break

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

Python: import sys
for e in sys.stdin:
 a,b,c,d,e,f=map(int,e.split())
 print("%-.4f %-.4f"%((c*e-b*f)/(a*e-b*d)+0,(c*d-a*f)/(b*d-a*e)+0))

Python: #0004
while True:
    try:
        a,b,c,d,e,f = map(float,input().split())
        y = (a*f-d*c)/(a*e-b*d)
        x = (f*b-e*c)/(b*d-a*e)
        if x == -0.0:
            x = 0.000
        elif y == -0.0:
            y = 0.000
        print(format(x, '.3f'),format(y, '.3f'))
    except:
        break

Python: while True:
    try:
        a,b,c,d,e,f=map(int,input().split())
        det=a*e-b*d
        x=(e*c-b*f)
        y=(a*f-d*c)
        if det<0:
            x=-x
            y=-y
            det=-det
        print("%.03f %.03f" %(x/det,y/det))
    except:
        break

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

Python: import sys
#import numpy as np
# AOJではnumpy使えません
#np.set_printoptions(formatter={'float': '{: 0.3f}'.format}) #桁を揃える

while True:
    line = sys.stdin.readline()
    if line is '':
        break
    #print(line)
    a = list(map(float, line.split(" ")))
    #print(a)
    tmp = a[0]
    for i in range(0, 3):
        a[i] = a[i] * a[3]
    for i in range(3, 6):
        a[i] = a[i] * tmp
    #print(a)
    y = (a[2] - a[5]) / (a[1] - a[4])
    x = (a[2] - a[1] * y) / a[0]
    print("{0:0.3f}".format(x), "{0:0.3f}".format(y))

Python: import sys
for e in sys.stdin:
 a,b,c,d,e,f=map(int,e.split())
 print("%-.3f %-.3f"%((c*e-b*f)/(a*e-b*d)+0,(c*d-a*f)/(b*d-a*e)+0))

Python: from sys import stdin
for line in stdin:
    a, b, c, d, e, f = map(float, line.split())
    anss = ['%.3f' % ((c * e - f * b) / (a * e - b * d)), '%.3f' % ((c * d - a * f) / (b * d - a * e))]
    for index, ans in enumerate(anss):
        if ans == '-0.000':
            anss[index] = '0.000'
    print(' '.join(anss))

Python: while True:
	try:
		a,b,c,d,e,f = map(float,raw_input().split(' '))
		print (c*e-b*f)/(a*e-b*d),(a*f-c*d)/(a*e-b*d)
	except: 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: def get_input():
    while True:
        try:
            yield "".join(input())
        
        except EOFError:
            break

if __name__ == "__main__":
    array = list(get_input())
    #print(array)
    for i in range(len(array)):
        a,b,c,d,e,f = array[i].split()
        
        if int(b)!=0:
            x = (int(b)*int(f) - int(c)*int(e))/(int(b)*int(d) - int(a)*int(e))
            y = -(int(a)/int(b))*x + int(c)/int(b)
        elif int(b)==0 and int(a)!=0:
            x = int(c)/int(a)
            y = -(int(d)/int(e))*x + int(f)
        
        print("{:.3f} {:.3f}".format(x,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:
    try:
        a,b,c,d,e,f=map(float,input().split(" "))
        if a*e-b*d != 0:
            x=(c*e-b*f)/(a*e-b*d)
            y=(a*f-c*d)/(a*e-b*d)
        print("{:.3f} {:.3f}".format(x,y))
    except:
        break

Python: x = []
y = []
while True:
    try:
        a, b, p, c, d, q = map(int, input().split())
        x.append((d*p-b*q)/(a*d-b*c))
        y.append((a*q-c*p)/(a*d-b*c))
    except EOFError:
        break

for i in range(len(x)):
    print("{:.3f} {:.3f}".format(x[i]+0, y[i]+0))

Python: import numpy as np

while True:
    try:
        a, b, c, d, e, f = map(float, input().split())
        A = [[a, b],
             [d, e]]
        
        Y = [c, f]
        X = np.linalg.solve(A, Y)
        print("{0:.3f} {1:.3f}".format(np.round(X[0], 4), np.round(X[1], 4)))

    except EOFError:
        break

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

        n = d/a
        a = n*a
        b = n*b
        c = n*c

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

        print("{0:.3f} {1:.3f}".format(x, y))
    except:
        break

Python: # coding: utf-8
# 83

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

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

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

Python: import math

def my_round(x,d=0):
    p = 10 ** d
    return float(math.floor((x * p) + math.copysign(0.5, x))) / p

class Equation():
    def __init__(self, a, b, c, d, e, f):
        self.a = a
        self.b = b
        self.c = c
        self.d = d
        self.e = e
        self.f = f

    def calc(self):
        temp = (self.a * self.e - self.b * self.d)
        temp_a = (self.c * self.e - self.b * self.f)
        temp_b = (self.f * self.a - self.c * self.d)
        x = my_round(temp_a/temp,4)
        y = my_round(temp_b/temp,4)

        return x, y

    def print(self):
        self.ans = self.calc()
        print("{0:.3f} {1:.3f}".format(self.ans[0],self.ans[1]))


def main():
    data = []
    while 1:
        try:
            n = input().split()

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

            data.append(Equation(a, b, c, d, e, f))

        except EOFError:
            break

    for datas in data:
        datas.print()

if __name__ == "__main__":
    main()

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

Python: import sys
for line in sys.stdin.readlines():
  a,b,c,d,e,f = map(float,line.split())
  x = (b*f-c*e)/(b*d-a*e)
  y = (c - a*x)/b
  print("%.3f %.3f" % (round(x,3),round(y,3)))

Python: import sys
#from me.io import dup_file_stdin

#@dup_file_stdin
def solve():
    for line in sys.stdin:
        a,b,c,d,e,f=map(float,line.split(' '))
        print("{:.3f} {:.3f}".format((c*e-b*f)/(a*e-b*d),(c*d-a*f)/(b*d-a*e)))
solve()