class Simultaneous
  def initialize(input)
    @a,@b,@c,@d,@e,@f = input.split(" ").map(&:to_f)
  end

  attr_accessor :a,:b,:c,:d,:e,:f

  def calc
    x = (@c * @e - @b * @f) / (@a * @e - @b * @d).to_f
    y = (@c * @d - @a * @f) / (@b * @d - @a * @e).to_f
    x = 0 if x.abs == 0.0
    y = 0 if y.abs == 0.0
    return [x, y]
  end
end

while data = gets
  ans = Simultaneous.new(data).calc
  puts sprintf("%.3f %.3f", ans[0], ans[1])
end