Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

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

func main() {
	sc.Split(bufio.ScanLines)
	for sc.Scan() {
		s := strings.Split(sc.Text(), " ")
		a, _ := strconv.ParseFloat(s[0], 64)
		b, _ := strconv.ParseFloat(s[1], 64)
		c, _ := strconv.ParseFloat(s[2], 64)
		d, _ := strconv.ParseFloat(s[3], 64)
		e, _ := strconv.ParseFloat(s[4], 64)
		f, _ := strconv.ParseFloat(s[5], 64)
		x := ((b * f) - (c * e)) / ((b * d) - (a * e))
		y := ((a * f) - (c * d)) / ((a * e) - (b * d))
		if x == 0 {
			fmt.Printf("0.000 %.3f\n", y)
		} else if y == 0 {
			fmt.Printf("%.3f 0.000\n", x)
		} else {
			fmt.Printf("%.3f %.3f\n", x, y)
		}
	}
}

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

    A = a*e - b*d
    x = (e*c - b*f)/A
    y = (a*f - d*c)/A
    # 出力の体裁を整え、-0.00を0.00にするため+0する
    print("{:.3f} {:.3f}".format(x+0,y+0))

Python: answers=[]
while True:
    try:
        numbers=input().split()
        for i in range(6):
            numbers[i]=float(numbers[i])
        times=numbers[0]/numbers[3]
        numbers[3]=numbers[3]*times
        numbers[4]=numbers[4]*times
        numbers[5]=numbers[5]*times
        y=(numbers[2]-numbers[5])/(numbers[1]-numbers[4])
        x=(numbers[2]-numbers[1]*y)/numbers[0]
        answers.append(x)
        answers.append(y)
    except:
        break

for i in range(len(answers)/2):
    print(answers[i*2],answers[i*2+1])

Python: import sys
import numpy as np

for i in sys.stdin:
    a,b,c,d,e,f=list(map(float, i.split()))
    A=np.matrix([[a,b],[d,e]])
    inv_A = np.linalg.inv(A)
    P=np.matrix([[c],[f]])
    X=inv_A.dot(P)
    print("{0:.3f} {1:.3f}".format(X[0,0], X[1,0]))

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

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

        if abs(x) < 1e-4:
            x = 0.0
        if abs(y) < 1e-4:
            y = 0.0

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

    except EOFError:
        break

Python: def get_input():
    while True:
        try:
            yield "".join(input())
        
        except EOFError:
            break

if __name__ == "__main__":
    array = list(get_input())
    for i in range(len(array)):
        temp_a,temp_b,temp_c,temp_d,temp_e,temp_f = array[i].split()
        
        a,b,c,d,e,f = int(temp_a),int(temp_b),int(temp_c),int(temp_d),int(temp_e),int(temp_f)
        
        if a!=0:
            if e-b*d/a !=0:
                y = (f-c*d/a)/(e-b*d/a)
                x = (c - b*y)/a
            else:
                print("cannot solve equation")
        else:
            if b!=0:
                y = c/b
                if d!=0:
                    x = (f -e*y)/d
                else:
                    print("cannot solve equation")
                
        
        print("{:.3f} {:.3f}".format(x,y))

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

Python: import sys

for line in sys.stdin:
    a,b,c,d,e,f = [float(w) for w in line.split()]
    
    print("{:.3f} {:.3f}".format((e*c-b*f)/(a*e-a*b), (d*c-a*f)/(b*d-a*e)))

Python: # -*- coding:utf-8 -*-
 
def main():
    while True:
        try:
            IN=input()
            val=IN.split(" ")
        except:
            break
        a=int(val[0])
        b=int(val[1])
        c=int(val[2])
        d=int(val[3])
        e=int(val[4])
        f=int(val[5])

        x=round(float((c*e-b*f)/(a*e-b*d)),3)
        y=round(float((c*d-a*f)/(b*d-a*e)),3)

        print(x,y)

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

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

Python: k=[]
try:
  while True:
    k.append(list(map(int,input().split())))
except EOFError:
  pass
for a,b,c,d,e,f in k:
  if f*b-c*e==0:
    x=0
  else:
    x=(f*b-c*e)/(b*d-a*e)

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

Python: import sys

a = []

for line in sys.stdin:
    a.append(line)

for s in a:
	a, b, c, d, e, f = map(int, a.split())

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

	print('{:.3f} {:.3f}'.format(round(x,3)+0.0,round(y,3)+0.0))

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

Python: # usr/bin/python
# coding: utf-8
################################################################################
# Simultaneous Equation
# Write a program which solve a simultaneous equation:
#
# ax+by=c
# dx+ey=f
#
# The program should print x and y for given a, b, c, d, e and f (-1,000 ??? a,b,c,d,e,f ??? 1,000). You can suppose that given equation has a unique solution.
#
# Input
# The input consists of several data sets, 1 line for each data set. In a data set, there will be a,b,c,d,e,f separated by a single space. The input terminates with EOF.
#
# Output
# For each data set, print x and y separated by a single space. Print the solution to three places of decimals. Round off the solution to three decimal places.
#
# Sample Input 1
# 1 2 3 4 5 6
# 2 -1 -2 -1 -1 -5
# Output for the Sample Input 1
# -1.000 2.000
# 1.000 4.000
# Sample Input 2
# 2 -1 -3 1 -1 -3
# 2 -1 -3 -9 9 27
# Output for the Sample Input 2
# 0.000 3.000
# 0.000 3.000
#
################################################################################

import sys

if __name__ == "__main__":

    for line in sys.stdin:
        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("{:-.4f} {:-.4f}".format(round(x,4),round(y,4)))
    pass

Python: import sys
import numpy as np

for i in sys.stdin:
    a,b,c,d,e,f=list(map(float, i.split()))
    A=np.matrix([[a,b],[d,e]])
    inv_A = np.linalg.inv(A)
    P=np.matrix([[c],[f]])
    X=inv_A.dot(P)
    print("{0:.3f} {1:.3f}".format(X[0,0], X[1,0]))

Python: import math
import itertools

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

Python: for line in sys.stdin:
    array = [float(x) for x in line.split()]
    ar1 = array[0:3]
    ar2 = array[3:]
    i = ar1[0]
    ar1 = [x*ar2[0] for x in ar1]
    ar2 = [x*i for x in ar2]
    y = (ar1[2] - ar2[2])/(ar1[1]-ar2[1])
    ar1 = array[0:3]
    x = (ar1[2]-ar1[1]*y)/ar1[0]
    print('%.3f %.3f' % (round(x,3), round(y,3)))

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)
        if(x == 0):
            x = 0
        if(y == 0):
            y = 0

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