class Array
  def simultaneous
    x = (self[2] * self[4] - self[1] * self[5]) / (self[0] * self[4] - self[1] * self[3]).to_f
    y = (self[2] * self[3] - self[0] * self[5]) / (self[1] * self[3] - self[0] * self[4]).to_f
    return [x, y]
  end

  def print_float
    print sprintf("%.3f %.3f", self[0], self[1])
  end
end

file = []
while s = gets
  file << s
end

file.each do |data|
  puts data.split(" ").map(&:to_i).simultaneous.print_float
end