Go: package main

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

func gcd(num1, num2 int) int {
	if num2 == 0 {
		return num1
	}
	num3 := num1 % num2
	return gcd(num2, num3)
}

func lcm(num1, num2 int) int {
	if num1%num2 != 0 {
		num3 := gcd(num1, num2)
		for i := 1; ; i++ {
			check := num3 * i
			if check%num1 == 0 && check%num2 == 0 {
				return check
			}
		}
	} else {
		return num1
	}
}

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	for scanner.Scan() {
		strNums := strings.Fields(scanner.Text())
		nums := []int{}
		for _, strNum := range strNums {
			num, _ := strconv.Atoi(strNum)
			nums = append(nums, num)
		}
		a := nums[0]
		b := nums[1]
		c := nums[2]
		d := nums[3]
		e := nums[4]
		f := nums[5]
		lcm := lcm(a, d)
		mulA := lcm / a
		mulD := lcm / d
		a *= mulA
		b *= mulA
		c *= mulA
		d *= mulD
		e *= mulD
		f *= mulD

		if d < 0 {
			d *= -1
			e *= -1
			f *= -1
		}

		bE := b - e
		cF := c - f
		y := float64(cF) / float64(bE)
		x := (float64(c) - (y * float64(b))) / float64(a)

		if x == 0 {
			fmt.Printf("%.3f ", 0.0)
		} else {
			fmt.Printf("%.3f ", x)
		}
		if y == 0 {
			fmt.Printf("%.3f\n", 0.0)
		} else {
			fmt.Printf("%.3f\n", y)
		}
	}
}

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

Python: # -*- coding: utf-8 -*-

while True:
    try:
        list = [float(x) for x in raw_input().split() ]
        x = (list[2]*list[4]-list[1]*list[5])/(list[0]*list[4]-list[1]*list[3])
        y = (list[0]*list[5]-list[2]*list[3])/(list[0]*list[4]-list[1]*list[3])

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

    except EOFError:
        break

Python: # Vol0004.
import sys

def main():
    data = []
    lines = sys.stdin.readlines()
    fp.close()

    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(int, input().split())
    except EOFError:
        break
    x = c/a + (f*a-c*d)*b / (e*a-d*b) / a
    y = (f*a - c*d) / (e*a - b*d)
    print('{:.3f} {:.3f}'.format(x, y))

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

Python: try:
    while True:
        a,b,c,d,e,f=[int(i) for i in input().split(" ")]
        x=(e*c-b*f)/(a*e-b*d)
        y=(a*f-c*d)/(a*e-b*d)
        if x==0:
            x=0
        if y==0:
            y=0
        print("%.3f %.3f"%(x,y))
except EOFError:
    pass

Python: import sys

lines = sys.stdin.readlines()
for line in lines:
    a, b, c, d, e, f = map(float, line.split())
    A = a * e - b * d
    if A == 0:
        break;
    x = (c * e - b * f) / A
    y = (a * f - c * d) / A
    print("%.3f %.3f" %(x,y))

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

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)
    except:
        break

    x = round(x, 3)
    y = round(y, 3)

    if x == -0.000:
        x = 0.000
    elif y == -0.000:
        y = 0.000

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

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(f'{x:.3f} {y:.3f}')
    except:
        break

Python: import sys
import math
def simeq(a,b,c,d,e,f):
    return ((c*e-b*f)/(a*e-b*d)+0,((a*f-c*d)/(a*e-b*d))+0)

if __name__ == '__main__':
    for line in sys.stdin:
        (a,b,c,d,e,f) = map(float,line.split())
        (x,y) = simeq(a,b,c,d,e,f)
        print("{:.3f} {:.3f}".format(round(x,3),round(y,3)))

Python: import numpy as np

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:
        break