Problem:


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



Sample input:
1 2 3 4 5 6
2 -1 -2 -1 -1 -5


Sample output:
-1.000 2.000
1.000 4.000

Submission status: Wrong Answer

Solution code:
data = []
try:
    while True:
        data.append(raw_input())

except EOFError:
        pass

for i in data:
    a, b, c, d, e, f = i.split()
    a, b, c, d, e, f = int(a), int(b), int(c), int(d), int(e), int(f)
    if a == b == c == d == e == f == 0:
        print "N/A N/A"
    elif (abs(a) <= 1000
        and abs(b) <= 1000
        and abs(c) <= 1000
        and abs(d) <= 1000
        and abs(e) <= 1000
        and abs(f) <= 1000):
        if b == 0:
            print "{:.3f} {:.3f}".format(c / a, 0)
        elif e == 0:
            print "{:.3f} {:.3f}".format(f / d, 0)
        else:
            for j in range(-1000, 1001):
                y1 = (c - (a * j)) / float(b)
                y2 = (f - (d * j)) / float(e)
                if y1 == y2:
                    print "{:.3f} {:.3f}".format(j, y1)
                    break

Submission status: Wrong Answer

Solution code:
data = []
try:
    while True:
        data.append(raw_input())

except EOFError:
        pass

for i in data:
    a, b, c, d, e, f = i.split()
    a, b, c, d, e, f = int(a), int(b), int(c), int(d), int(e), int(f)
    if a == b == c == d == e == f == 0:
        print "N/A N/A"
    elif (abs(a) <= 1000
        and abs(b) <= 1000
        and abs(c) <= 1000
        and abs(d) <= 1000
        and abs(e) <= 1000
        and abs(f) <= 1000):
        if a == 0:
            print "N/A {:.3f}".format(c / b)
        elif d == 0:
            print "N/A {:.3f}".format(f / e)
        elif b == 0:
            print "{:.3f} N/A".format(c / a)
        elif e == 0:
            print "{:.3f} N/A".format(f / d)
        else:
            for j in range(-1000, 1001):
                y1 = (c - (a * j)) / float(b)
                y2 = (f - (d * j)) / float(e)
                if y1 == y2:
                    print "{:.3f} {:.3f}".format(j, y1)
                    break

Submission status: Wrong Answer

Solution code:
data = []
try:
    while True:
        data.append(raw_input())

except EOFError:
        pass

for i in data:
    a, b, c, d, e, f = i.split()
    a, b, c, d, e, f = int(a), int(b), int(c), int(d), int(e), int(f)
    if (a != 0 and b != 0 and d != 0 and e != 0): 
        if (abs(a) <= 1000
            and abs(b) <= 1000
            and abs(c) <= 1000
            and abs(d) <= 1000
            and abs(e) <= 1000
            and abs(f) <= 1000):
            for j in range(-1000, 1001):
                y1 = (c - (a * j)) / float(b)
                y2 = (f - (d * j)) / float(e)
                if y1 == y2: 
                    print "{:.3f} {:.3f}".format(j, y1) 
                    break

Submission status: Wrong Answer

Solution code:
data = []
try:
    while True:
        data.append(raw_input())

except EOFError:
        pass

for i in data:
    a, b, c, d, e, f = i.split()
    a, b, c, d, e, f = int(a), int(b), int(c), int(d), int(e), int(f)
    if (a != 0 and b != 0 and d != 0 and e != 0):
        if (abs(a) <= 1000
            and abs(b) <= 1000
            and abs(c) <= 1000
            and abs(d) <= 1000
            and abs(e) <= 1000
            and abs(f) <= 1000):
            for j in range(-1000, 1001):
                y1 = (c - (a * j)) / float(b)
                y2 = (f - (d * j)) / float(e)
                if y1 == y2:
                    print "{:.3f} {:.3f}".format(j, y1)
                    break

Submission status: Wrong Answer

Solution code:
data = []
try:
    while True:
        data.append(raw_input())

except EOFError:
    pass

for i in data:
    a, b, c, d, e, f = map(float, (i.split()))
    if (a != 0 and b != 0 and d != 0 and e != 0): 
        if (abs(a) <= 1000
            and abs(b) <= 1000
            and abs(c) <= 1000
            and abs(d) <= 1000
            and abs(e) <= 1000
            and abs(f) <= 1000):
            y = (a*f - c*d) / (a*e - b*d)
            x = (c - b*y) / a 
            print "{:.3f} {:.3f}".format(x, y)

Submission status: Wrong Answer

Solution code:
import sys

for line in sys.stdin:
    a = map(long,line.split())
    m = a[0]*a[4]-a[1]*a[3]

    x=long( (a[4]*a[2] - a[1]*a[5])/m)
    y=long((a[0]*a[5] - a[2]*a[3])/m)
    print "%.3f %.3f" % (x,y)

Submission status: Wrong Answer

Solution code:
import sys

for line in sys.stdin:
    a = map(long,line.split())
    m = a[0]*a[4]-a[1]*a[3]

    x=long( (a[4]*a[2] - a[1]*a[5])/m)
    y=long((a[0]*a[5] - a[2]*a[3])/m)

    if x == -0:
	x = 0.0
    if y == -0:
	y = 0.0

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

Submission status: Wrong Answer

Solution code:
import sys

for line in sys.stdin:
    a = map(long,line.split())
    m = a[0]*a[4]-a[1]*a[3]

    x= (a[4]*a[2] - a[1]*a[5])/m
    y= (a[0]*a[5] - a[2]*a[3])/m

    if x == -0:
	x = 0
    if y == -0:
	y = 0

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

Submission status: Wrong Answer

Solution code:
import sys

while True:
    try:
        a = map(long,raw_input().split())
        m = a[0]*a[4]-a[1]*a[3]

        x= (a[4]*a[2] - a[1]*a[5])/m
        y= (a[0]*a[5] - a[2]*a[3])/m

        if x == -0:
	    x = 0
        if y == -0:
	    y = 0

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

    except:
	break

Submission status: Wrong Answer

Solution code:
while True:
    try:
        a = map(long,raw_input().split())
        m = a[0]*a[4]-a[1]*a[3]

        x = (a[4]*a[2] - a[1]*a[5])/m
        y = (a[0]*a[5] - a[2]*a[3])/m

	if x == -0:
            x = 0
	if y == -0:
            y = 0

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

    except EOFError:
	break

Submission status: Wrong Answer

Solution code:

import sys


def solv(a,b,c,d,e,f):
    if e == 0.0:
        x = f / d
        y = (c - a * x) / b
    else:
        x = (c * e - b * f) / (a * e - b * d)
        y = (f - d * x) / e
    return (x, y)


lis = sys.stdin.readlines()
for line in lis:
    a, b, c, d, e, f = tuple(map(float, line.split(' ')))
    (x, y) = solv(a, b, c, d, e, f)
    print "%5.3f %5.3f" % (x, y)

Submission status: Wrong Answer

Solution code:

import sys


def solv(a,b,c,d,e,f):
    if e == 0.0:
        x = f / d
        y = (c - a * x) / b
    else:
        x = (c * e - b * f) / (a * e - b * d)
        y = (f - d * x) / e
    return (x, y)


lis = sys.stdin.readlines()
for line in lis:
    a, b, c, d, e, f = tuple(map(float, line.split(' ')))
    (x, y) = solv(a, b, c, d, e, f)
    print "%5.3f %5.3f" % (round(x, 3), round(y, 3))

Submission status: Wrong Answer

Solution code:

import sys


def solv(a,b,c,d,e,f):
    if e == 0.0:
        x = f / d
        y = (c - a * x) / b
    elif b == 0.0:
        x = c / a
        y = (f - d * x) / e
    else:
        x = (c * e - b * f) / (a * e - b * d)
        y = (f - d * x) / e
    return (x, y)


lis = sys.stdin.readlines()
for line in lis:
    a, b, c, d, e, f = tuple(map(float, line.split(' ')))
    (x, y) = solv(a, b, c, d, e, f)
    print "%5.3f %5.3f" % (round(x, 3), round(y, 3))

Submission status: Wrong Answer

Solution code:
a, b, c, d, e, f = map(float, raw_input().split())
print "{0:.3f} {1:.3f}".format((c*e-b*f)/(a*e-b*d), (a*f-c*d)/(a*e-b*d))

Submission status: Wrong Answer

Solution code:
while True:
    try:
        a, b, c, d, e, f = map(float, raw_input().split())
    except:
        break
    print "{0:.3f} {1:.3f}".format((c*e-b*f)/(a*e-b*d), (a*f-c*d)/(a*e-b*d))

Submission status: Wrong Answer

Solution code:
while True:
    try:
        a, b, c, d, e, f = map(float, raw_input().split())
    except EOFError:
        break
    print "{0:.3f} {1:.3f}".format((c*e-b*f)/(a*e-b*d), (a*f-c*d)/(a*e-b*d))

Submission status: Wrong Answer

Solution code:
while True:
    try:
        a, b, c, d, e, f = map(float, raw_input().split())
        print "{0:.3f} {1:.3f}".format((c*e-b*f)/(a*e-b*d), (a*f-c*d)/(a*e-b*d))
    except EOFError:
        break

Submission status: Wrong Answer

Solution code:
while True:
    try:
        a, b, c, d, e, f = map(int, raw_input().split())
    except EOFError:
        break
    print "{0:.3f} {1:.3f}".format((c*e-b*f)/(a*e-b*d), (a*f-c*d)/(a*e-b*d))

Submission status: Wrong Answer

Solution code:
while True:
    try:
        a, b, c, d, e, f = map(int, raw_input().split())
    except EOFError:
        break
    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))

Submission status: Wrong Answer

Solution code:
try :
  while True :
    (a,b,c,d,e,f) = map(int, raw_input().split())

    print "%.3f %.3f"%((c*e-b*f)/(a*e-b*d), (a*f-c*d)/(a*e-b*d))
except EOFError :
  pass

Submission status: Wrong Answer

Solution code:
try :
  while True :
    (a,b,c,d,e,f) = map(int, raw_input().split())

    x = (c*e-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

Submission status: Wrong Answer

Solution code:
try :
  while True :
    (a,b,c,d,e,f) = map(int, raw_input().split())

    print "%.3f %.3f"%((c*e-b*f)/(a*e-b*d)+0, (a*f-c*d)/(a*e-b*d)+0)
except EOFError :
  pass

Submission status: Wrong Answer

Solution code:
try :
  while True :
    (a,b,c,d,e,f) = map(float, raw_input().split())

    print "%.3f %.3f"%((c*e-b*f)/(a*e-b*d), (a*f-c*d)/(a*e-b*d))
except EOFError :
  pass

Submission status: Wrong Answer

Solution code:
# -*- coding:utf-8 -*-

if __name__ == '__main__':

	a, b, c, d, e, f = [float(num) for num in raw_input().split()]
	x = ((e*c)-(b*f))/((e*a)-(b*d))
	y = ((d*c)-(a*f))/((d*b)-(a*e))
	
	print '%0.3f' % x
	print '%0.3f' % y

Submission status: Wrong Answer

Solution code:
# -*- coding:utf-8 -*-

if __name__ == '__main__':

	while True:
		try:
			a, b, c, d, e, f = [float(num) for num in raw_input().split()]
			x = ((e*c)-(b*f))/((e*a)-(b*d))
			y = ((d*c)-(a*f))/((d*b)-(a*e))
		except:
			break
		
		print '%0.3f' % x
		print '%0.3f' % y

Submission status: Wrong Answer

Solution code:
# -*- coding:utf-8 -*-

if __name__ == '__main__':

	while True:
		try:
			a, b, c, d, e, f = [float(num) for num in raw_input().split()]
			x = ((e*c)-(b*f))/((e*a)-(b*d))
			y = ((d*c)-(a*f))/((d*b)-(a*e))
		except:
			break
		
		print '%0.3f %0.3f' % (x , y)

Submission status: Wrong Answer

Solution code:
import sys


def gcd(a, b):
    return gcd(b, a % b) if a % b else b


def lcm(a, b):
    return a * b / gcd(a, b)

for line in sys.stdin:
    data = map(int, line.split())
    a, b, c, d, e, f = data
    if a == 0:
        y = c * 1.0 / b
        x = (f - e * y) * 1.0 / d
        print "%.3f %.3f" % (round(x, 4), round(y, 4))
        continue
    if b == 0:
        y = c * 1.0 / a
        x = (f - e * y) * 1.0 / d
        print "%.3f %.3f" % (round(x, 4), round(y, 4))
        continue
    if d == 0:
        x = f * 1.0 / e
        y = (c - b * x) * 1.0 / a
        print "%.3f %.3f" % (round(x, 4), round(y, 4))
        continue
    if e == 0:
        x = f * 1.0 / d
        y = (c - b * x) * 1.0 / a
        print "%.3f %.3f" % (round(x, 4), round(y, 4))
        continue
        
    ix = lcm(a, d) / a
    jx = lcm(a, d) / d
    iy = lcm(b, e) / b
    jy = lcm(b, e) / e
    x = (c*1.0*iy - f*jy) / (a*iy - d*jy)
    y = (c*1.0*ix - f*jx) / (b*ix - e*jx)
    print "%.3f %.3f" % (round(x, 4), round(y, 4))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
for line in sys.stdin:
    a, b, c, d, e, f = map(int, line.rstrip('\n').split(' '))
    x = str(int((d*c - b*f) * 1000 / (a*d - b*c)))
    y = str(int((a*f - c*c) * 1000 / (a*d - b*c)))
    print '%s.%s %s.%s' % (x[:-3], x[-3:], y[:-3], y[-3:])

Submission status: Wrong Answer

Solution code:
import sys
for line in sys.stdin:
    a, b, c, d, e, f = map(int, line.rstrip('\n').split(' '))
    x = str(int((e*c - b*f) * 1000 / (a*e - b*d)))
    y = str(int((a*f - d*c) * 1000 / (a*e - b*d)))
    print '%s.%s %s.%s' % (x[:-3], x[-3:], y[:-3], y[-3:])

Submission status: Wrong Answer

Solution code:
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

Submission status: Wrong Answer

Solution code:
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

Submission status: Wrong Answer

Solution code:
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)
                if x == 0:
                        x = 0
                if y == 0:
                        y = 0
                print("{:.3f} {:.3f}".format(x,y))
except:
        pass

Submission status: Wrong Answer

Solution code:
try:
        while 1:
                a, b, c, d, e, f = map(float,raw_input().split())
                x = (c/b-f/e) / (a/b-d/e)
                y = (c/a-f/d) / (b/a-e/d)
                if x == 0:
                        x = 0
                if y == 0:
                        y = 0
                print("{:.3f} {:.3f}".format(x,y))
except:
        pass

Submission status: Wrong Answer

Solution code:
while 1:
        try:
                a, b, c, d, e, f = map(float,raw_input().split())
                x = (c/b-f/e) / (a/b-d/e)
                x = x if x else 0
                y = (c/a-f/d) / (b/a-e/d)
                y = y if y else 0
                print("{:.3f} {:.3f}".format(x,y))
        except:
                break

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python

get_y = lambda a,b,c,d,e,f: (f-(c*d/a)) / (e-(b*d/a))
get_x = lambda a,b,c,y: (c-b*y)/a

if __name__ == "__main__":
    while True:
        try:
            a,b,c,d,e,f = [float(z) for z in raw_input().split()]
            y = get_y(a,b,c,d,e,f)
            x = get_x(a,b,c,y)
            print "%f %f" % (x, y)
        except EOFError:
            break

Submission status: Wrong Answer

Solution code:
a, b, c, d, e, f = map(int, raw_input().split())
det = a*e-b*d
x, y = float(e*c+(-b)*f)/det, float((-d)*c+a*f)/det
print '%.3f %.3f' % (x, y)

Submission status: Wrong Answer

Solution code:
data = raw_input().split('\n')
for d in data:
    a, b, c, d, e, f = map(int, d.split())
    det = a*e-b*d
    x, y = float(e*c+(-b)*f)/det, float((-d)*c+a*f)/det
    print '%.3f %.3f' % (x, y)

Submission status: Wrong Answer

Solution code:
data = raw_input().split('\n')
print data
for d in data:
    a, b, c, d, e, f = map(int, d.split())
    det = a*e-b*d
    x, y = float(e*c+(-b)*f)/det, float((-d)*c+a*f)/det
    print '%.3f %.3f' % (x, y)

Submission status: Wrong Answer

Solution code:
data = raw_input()
while data:
    try:
        a, b, c, d, e, f = map(int, data.split())
        det = a*e-b*d
        x, y = float(e*c+(-b)*f)/det, float((-d)*c+a*f)/det
        print '%.3f %.3f' % (x, y)
        data = raw_input()
    except EOFError:
        break

Submission status: Wrong Answer

Solution code:
while True:
    try:
        a, b, c, d, e, f = map(int, raw_input().split())
        det = a*e-b*d
        x, y = float(e*c+(-b)*f)/det, float((-d)*c+a*f)/det
        print '%.3f %.3f' % (x, y)
    except EOFError:
        break

Submission status: Wrong Answer

Solution code:
while True:
    try:
        a, b, c, d, e, f = map(int, raw_input().split())
        det = float(a*e-b*d)
        x, y = (e*c+(-b)*f)/det, ((-d)*c+a*f)/det
        print '%.3f %.3f' % (x, y)
    except:
        break

Submission status: Wrong Answer

Solution code:
import sys
for s in sys.stdin:
    a,b,c,d,e,f=map(int,s.split())
    y=(a*f-c*d)/(a*e-b*d)
    x=(c-b*y)/a
    print "%.3f %.3f" %(x,y)

Submission status: Wrong Answer

Solution code:
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 ("{0:.4f} {1:.4f}".format(x, y))

Submission status: Wrong Answer

Solution code:
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))

Submission status: Wrong Answer

Solution code:
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 ("{0:.3f} {1:.3f}".format(x + 0, y + 0))

Submission status: Wrong Answer

Solution code:
z = []
while True:
	try:
		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)
		z.append([x, y])
	
	except:
		break
print(z)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

import sys

for line in sys.stdin.readlines():
    List = map(float, line.strip().split())

    [a, b, c, d, e, f] = List

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

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

import sys

for line in sys.stdin.readlines():
    List = map(float, line.strip().split())

    [a, b, c, d, e, f] = List

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

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

import sys

for line in sys.stdin.readlines():
    List = map(float, line.strip().split())

    [a, b, c, d, e, f] = List

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

    print "%.3f %.3f\n" % (round(x, 3), round(y, 3))

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

import sys

outList = []
for line in sys.stdin.readlines():
    List = map(float, line.strip().split())

    [a, b, c, d, e, f] = List

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

    outList.append("%.3f %.3f" % (round(x, 3), round(y, 3)))

for i in xrange(len(outList)):
    print outList[i]

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

import sys

outList = []
for line in sys.stdin.readlines():
    List = map(float, line.strip().split())

    [a, b, c, d, e, f] = List

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

    outList.append("%.3f %.3f" % (round(x, 3), round(y, 3)))

for i in xrange(len(outList)):
    print outList[i]

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

import sys

outList = []
for line in sys.stdin.readlines():
    List = map(float, line.strip().split())

    [a, b, c, d, e, f] = List

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

    outList.append("%.3f %.3f" % (x, y))

for i in xrange(len(outList)):
    print outList[i]

Submission status: Wrong Answer

Solution code:
while True:
    try:
        a, b, c, d, e, f = map(int, raw_input().split()) 
        x = float(b*c - e*f)/(a*e - b*d)
        y = float(c*d - a*f)/(b*d - a*e)
        print x, y
    except:
        break

Submission status: Wrong Answer

Solution code:
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)
        print x, y
    except:
        break

Submission status: Wrong Answer

Solution code:
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)
        print ("%f %f" %(x, y))
    except:
        break

Submission status: Wrong Answer

Solution code:
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)
        print ("%f %f" % (x, y))
    except:
        break

Submission status: Wrong Answer

Solution code:
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)
        print ("%f %f" % (round(x,-3), round(y),-3))
    except:
        break

Submission status: Wrong Answer

Solution code:
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)
        print ("%f %f" % (round(x,-3), round(y,-3)))
    except:
        break

Submission status: Wrong Answer

Solution code:
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)
        print ("%.3f %.3f" % (round(x,-3), round(y,-3)))
    except:
        break

Submission status: Wrong Answer

Solution code:
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)
        print ("%.3f %.3f" % (round(x,-4), round(y,-4)))
    except:
        break

Submission status: Wrong Answer

Solution code:
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)
        print ("%.3f %.3f" % (round(x,4), round(y,4)))
    except:
        break

Submission status: Wrong Answer

Solution code:
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)
        print ("%.3f %.3f" % (round(x,3), round(y,3)))
    except:
        break

Submission status: Wrong Answer

Solution code:
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

Submission status: Wrong Answer

Solution code:
while True:
    try:
        a, b, c, d, e, f = map(floar, raw_input().split()) 
        x = (c*e - b*f)/(a*e - b*d)
        y = (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

Submission status: Wrong Answer

Solution code:
while True:
    try:
        a, b, c, d, e, f = map(float, raw_input().split()) 
        x = (c*e - b*f)/(a*e - b*d)
        y = (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

Submission status: Wrong Answer

Solution code:
while True:
    try:
        a, b, c, d, e, f = map(float, raw_input().split()) 
        x = (c*e - b*f)/(a*e - b*d)
        y = (c*d - a*f)/(b*d - a*e)
        x = round(10000*x)/10000
        y = round(10000*y)/10000
        print ("%.3f %.3f" % (x, y))
    except:
        break

Submission status: Wrong Answer

Solution code:
while True:
  try:
    a,b,c,d,e,f=map(float,raw_input().split())
    y=(d*c-a*f)*1.0/(d*b-a*e)
    x=(b*c-e*f)*1.0/(a*e-b*d)
    print "%.3f %.3f"%(x,y)
  except:break

Submission status: Wrong Answer

Solution code:
while 1:
  try:
    a, b, c, d, e, f = map(int, raw_input().split())
    g = b / e
    x = (c - g * f) / (float(a) - g)
    y = (c - a * x) / float(b)
    print str(x) + " " + str(y) + "\n"
  except:
    break

Submission status: Wrong Answer

Solution code:
while 1:
  try:
    a, b, c, d, e, f = map(int, raw_input().split())
    g = float(b) / float(e)
    x = (c - g * f) / (a - g)
    y = (c - a * x) / b
    print str(x) + " " + str(y) + "\n"
  except:
    break

Submission status: Wrong Answer

Solution code:
while 1:
  try:
    a, b, c, d, e, f = map(float, raw_input().split())
    x = (c * e - b * f) / (a * e - b * d)
    y = (f * a - c * d) / (a * e - d * b)
    print str(x) + " " + str(y) + "\n"
  except:
    break

Submission status: Wrong Answer

Solution code:
while 1:
  try:
    a, b, c, d, e, f = map(float, raw_input().split())
    x = ( (c * e - b * f) * 1000 / (a * e - b * d) ) / 1000
    y = ( (f * a - c * d) * 1000 / (a * e - d * b) ) / 1000
    print str(x) + " " + str(y) + "\n"
  except:
    break

Submission status: Wrong Answer

Solution code:
while 1:
  try:
    a, b, c, d, e, f = map(float, raw_input().split())
    x = ( (c * e - b * f) * 1000 / (a * e - b * d) ) / 1000
    y = ( (f * a - c * d) * 1000 / (a * e - d * b) ) / 1000
    print str('%3f' % x) + " " + str('%3f' % y) + "\n"
  except:
    break

Submission status: Wrong Answer

Solution code:
while 1:
  try:
    a, b, c, d, e, f = map(float, raw_input().split())
    x = ( (c * e - b * f) * 1000 / (a * e - b * d) ) / 1000
    y = ( (f * a - c * d) * 1000 / (a * e - d * b) ) / 1000
    print str('%.3f' % x) + " " + str('%.3f' % y) + "\n"
  except:
    break

Submission status: Wrong Answer

Solution code:
while 1:
  try:
    a, b, c, d, e, f = map(float, raw_input().split())
    x = (c * e - b * f) / (a * e - b * d)
    y = (f * a - c * d) / (a * e - d * b)
    print str('%.3f' % x) + " " + str('%.3f' % y) + "\n"
  except:
    break

Submission status: Wrong Answer

Solution code:
while 1:
  try:
    a, b, c, d, e, f = map(float, raw_input().split())
    x = ((c * e - b * f) * 1000 / (a * e - b * d)) / 1000
    y = ((f * a - c * d) * 1000 / (a * e - d * b)) / 1000
    print str('%.3f' % x) + " " + str('%.3f' % y) + "\n"
  except:
    break

Submission status: Wrong Answer

Solution code:
while 1:
  try:
    a, b, c, d, e, f = map(float, raw_input().split())
    x = (((c * e - b * f) * 1000) / (a * e - b * d)) / 1000
    y = (((f * a - c * d) * 1000) / (a * e - d * b)) / 1000
    print str('%.3f' % x) + " " + str('%.3f' % y) + "\n"
  except:
    break

Submission status: Wrong Answer

Solution code:
while 1:
    try:
        a, b, c, d, e, f = map(float, raw_input().split())
        x = (c * e - b * f) / (a * e - b * d)
        y = (f * a - c * d) / (a * e - d * b)
        print str('%.3f' % x) + " " + str('%.3f' % y) + "\n"
    except:
        break

Submission status: Wrong Answer

Solution code:
while 1:
    try:
        a, b, c, d, e, f = map(float, raw_input().split())
        x = (c * e - b * f) / (a * e - b * d)
        y = (f * a - c * d) / (a * e - d * b)
        print str(round(('%.3f' % x), 3)) + " " + str(round(('%.3f' % y), 3)) + "\n"
    except:
        break

Submission status: Wrong Answer

Solution code:
while 1:
    try:
        a, b, c, d, e, f = map(float, raw_input().split())
        x = (c * e - b * f) / (a * e - b * d)
        y = (f * a - c * d) / (a * e - d * b)
        if x == -0.000:
            x = 0.000
        if y == -0.000:
            y = 0.000
        print str(round(('%.3f' % x), 3)) + " " + str(round(('%.3f' % y), 3)) + "\n"
    except:
        break

Submission status: Wrong Answer

Solution code:
while 1:
    try:
        a, b, c, d, e, f = map(float, raw_input().split())
        matrix = [[a, b, c], [d, e, f]]
        for i in range(2):
            tmp = matrix[i][i]
            for j in range(3):
                matrix[i][j] = matrix[i][j] / tmp
            for j in range(2):
                if i == j:
                    continue
                else:
                    a = matrix[j][i]
                    for k in range(i, 3):
                        matrix[j][k] = matrix[j][k] - a * matrix[i][k]
        print matrix[0][2], matrix[1][2]
    except:
        break

Submission status: Wrong Answer

Solution code:
try:
    while True:
        a, b, c, d, e, f = map(int, raw_input().split())
        x = (c * e - b * f) / (a * e - b * d)
        y = (f * a - c * d) / (a * e - d * b)
        print round(x, 3), round(y, 3)
except:
    pass

Submission status: Wrong Answer

Solution code:
try:
    while True:
        a, b, c, d, e, f = map(int, raw_input().split())
        x = (c * e - b * f) / (a * e - b * d)
        y = (f * a - c * d) / (a * e - d * b)
        print "{:.3f} {:.3f}".format(round(x, 3), round(y, 3))
except:
    pass

Submission status: Wrong Answer

Solution code:
a,b,c,d,e,f = map(int,raw_input().split())

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

print "%0.3f %0.3f" % (round(x,3),round(y,3))

Submission status: Wrong Answer

Solution code:
while 1:
    try:
        a,b,c,d,e,f = map(float,raw_input().split())

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

Submission status: Wrong Answer

Solution code:
while 1:
    try:
        a,b,c,d,e,f = map(float,raw_input().split())

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

Submission status: Wrong Answer

Solution code:
def zero3(n):
	ret = str(n)
	while len(ret) < 3:
		ret = "0" + ret
	return ret

def to_str(n):
    a = int(n*0.001)
    b = n % 1000
    return str(a) + "." + zero3(b)


while 2>1:
	try:
		a,b,c,d,e,f = map(int, raw_input().split(" "))
		x=int(1000*(c*e-b*f)/(e*a-b*d) + 0.5)
		y=int(1000*(c*d-a*f)/(b*d-e*a) + 0.5)
		print " ".join(map(to_str,[x,y]))
	except EOFError:
		break
	except ValueError:
		break

Submission status: Wrong Answer

Solution code:
import math
def zero3(n):
	ret = str(n)
	while len(ret) < 3:
		ret = "0" + ret
	return ret

def to_str(n):
    a = int(n*0.001)
    b = n % 1000
    return str(a) + "." + zero3(b)

while 2>1:
	try:
		a,b,c,d,e,f = map(int, raw_input().split(" "))
		x=int(math.floor(1000*(c*e-b*f)/(e*a-b*d) + 0.5))
		y=int(math.floor(1000*(c*d-a*f)/(b*d-e*a) + 0.5))
		print " ".join(map(to_str,[x,y]))
	except EOFError:
		break
	except ValueError:
		break

Submission status: Wrong Answer

Solution code:
while 2>1:
	try:
		a,b,c,d,e,f = map(int, raw_input().split(" "))
		x=(c*e-b*f)/(e*a-b*d)
		y=(c*d-a*f)/(b*d-e*a)
		print "%.3f %.3f" % (x,y)
	except EOFError:
		break
	except ValueError:
		break

Submission status: Wrong Answer

Solution code:
while 2>1:
	try:
		a,b,c,d,e,f = map(float, raw_input().split(" "))
		x=(c*e-b*f)/(e*a-b*d)
		y=(c*d-a*f)/(b*d-e*a)
		print "%.3f %.3f" % (x,y)
	except EOFError:
		break
	except ValueError:
		break

Submission status: Wrong Answer

Solution code:
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)/(a * e - b * d)

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

Submission status: Wrong Answer

Solution code:
a,b,c,d,e,f = map(float,raw_input().split())

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

print "%0.3f %0.3f" % (x ,y)