values = gets
a,b,c,d,e,f = values.split(' ').map{|i| i.to_f}
if a == 0
 y = (c/b).round(3)
 x = ((f-e*y)/d).round(3)
elsif b == 0
 x = (c/a).round(3)
 y = ((f-d*x)/e).round(3)
elsif d == 0
 y = (f/e).round(3)
 x = ((c-b*y)/a).round(3)
elsif e == 0
 x = (f/d).round(3)
 y = ((c-a*x)/b).round(3)
else
 x = ((b*f-c*e)/(b*d-a*e)).round(3)
 y = ((c-a*x)/b).round(3)
end

if x == 0
  x = x.to_s.delete("-").to_f
end

if y == 0
  y = y.to_s.delete("-").to_f
end

puts "#{sprintf("%.3f",x.round(3))} #{sprintf("%.3f",y.round(3))}"