Go: package main

import "fmt"

func main() {

	for {
		var a, b, c, d, e, f float64
		var x, y float64
		i, _ := fmt.Scanf("%f %f %f %f %f %f", &a, &b, &c, &d, &e, &f)
		if i != 6 {
			return
		}

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

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

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

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

if __name__ == "__main__":
    inputlist = list(get_input())
    for line in inputlist:
        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)))

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
for i in sys.stdin:
    a, b, c, d, e, f = map(int, i.split())
    print("{0:.3f} {1:.3f}".format(round((c * e - b * f) / (a * e - b * d), 3), round((c * d - a * f) / (b * d - a * e), 3)))

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

    except:
        break

Python: import fileinput
if __name__ == "__main__":
    for line in fileinput.input():
        v = [int(i) for i in line.split(" ")]
        x = (v[2] * v[4] - v[1] * v[5]) / (v[0] * v[4] - v[1] * v[3])
        y = (v[2] * v[3] - v[0] * v[5]) / (v[1] * v[3] - v[0] * v[4])
        if -0.0005 < x <= 0:
            x = 0.000
        if -0.0005 < y <= 0:
            y = 0.000
        print(format(x, ".3f"), format(y, ".3f"))

Python: while True:
    try:
        a, b, c, d, e, f = map(float, input().split())
        y = (a*f - c*d) / (a*e - b*d)
        x = (c - b*y) / a
        print ("%0.3f %0.3f" % (x, y))
    except:
        break

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

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(f'{(c-b*y)/a:.3f} {y:.3f}')

Python: # coding=utf-8

while True:
    try:
        number_list = list(map(float, input().split()))
    except EOFError:
        break
    det = number_list[0]*number_list[4] - number_list[1]*number_list[3]
    inverse_list = [number_list[4] / det, -number_list[1] / det, -number_list[3] / det, number_list[0] / det]

    x = inverse_list[0]*number_list[2] + inverse_list[1]*number_list[5]
    y = inverse_list[2]*number_list[2] + inverse_list[3]*number_list[5]

    print('{0:.3f} {1:.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, y))

Python: # input
inputs = []
while True:
  try:
    inputs.append(list(map(float,input().split())))
  except EOFError:
    break

# calculation
for i in inputs:
  x=(i[2]*i[4]-i[1]*i[5])/(i[0]*i[4]-i[1]*i[3])
  y=(i[0]*i[5]-i[2]*i[3])/(i[0]*i[4]-i[1]*i[3])
  print("{0:.3f} {1:.3f}".format(x,y))

Python: t = 0
while t == 0:	
		a,b,c,d,e,f = [int(i) for i in input().split()]

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

Python: from sys import stdin
for l in stdin:
  a,b,c,d,e,f = map(int,l.split())
  x = round((c*e-b*f)/(a*e-b*d),3)
  y = round((c*d-a*f)/(b*d-a*e),3)
  print("%s %s"%("{0:.3f}".format(x),"{0:.3f}".format(y)))

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)+0, (-d*c+a*f)/(a*e-b*d)+0))
    except:
        break

Python: import sys
from decimal import Decimal

def main():
    for input_line in sys.stdin:
        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: 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: x,y = [0]*2,[0]*2
for i in range(2):
    k = list(map(float,input().split()))
    n = k[0]*k[4] -k[1]*k[3]

    x[i],y[i] = (k[4]*k[2]-k[1]*k[5])/n,(-k[3]*k[2]+k[0]*k[5])/n    
    if x == 0:
        x = 0
    if y == 0:
        y = 0
for i in range(2):
    print("{0:0.3f} {1:0.3f}".format(x[i],y[i]))

Python: import sys
from math import fabs


if __name__ == '__main__':
    epsilon = 1e-8
    # ??????????????\?????¨???????????????
    for line in sys.stdin:
        a, b, e, c, d, f = [int(x) for x in line.strip().split(' ')]
        x = 1/(a*d-b*c) * (d*e - b*f)
        y = 1/(a*d-b*c) * (-c*e + a*f)
        # ?¨????????????¨?????? -0.0 ???????????´???????????¶?????? 0.0 ?????????
        #if fabs(x) < epsilon:
        #    x = 0.0
        #if fabs(y) < epsilon:
        #    y = 0.0
        print('{0:.3f}, {1:.3f}'.format(x+0.0, y+0.0))