                            

def main
  while nums = gets
    nums = nums.chomp.split(/\s/).collect { |x| x.to_i}
    x, y = solves nums
    puts "%.3f %.3f" % [x, y]
  end
end

def solves nums
  a, b, c, d, e, f = nums
  x = (1.0 * c * e - f * b) / (a * e - d * b)
  y = (1.0 * c * d - f * a) / (b * d - a * e)
  x = 0.000 if x.abs <= 0.000001
  y = 0.000 if y.abs <= 0.000001
  [x, y]   
end

main