#!/usr/bin/env ruby
# encoding: utf-8

while line = gets do
	a, b, c ,d ,e ,f = line.split.map(&:to_i)
	y = ( a * f - c * d ) / ( a * e - b * d ) + 0.0005
	x = ( c - b * (( a * f - c * d ) / ( a * e - b * d ))) / a + 0.0005
	puts "#{sprintf("%.3f", x )} #{sprintf("%.3f", y )}"
end