while data = gets
  if data==nil then
    break
  end
  data2 = data.split(" ")
  data2.map! {|x| x.to_f}
  x = (data2[5]*data2[1]-data2[2]*data2[4])/(data2[1]*data2[3]-data2[0]*data2[4])

  y = (data2[2]-data2[0]*x)/data2[1]
  puts "#{sprintf("%.03f",x)} #{sprintf("%.03f",y)}"
end