
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, y]
end

main