def getX(a, b, c, d, e, f)
  denominator = a * e - b * d
  numerator = c * e - b * f
  x = numerator / denominator
  x = 0.0 if x == -0.0
  return x
end

def getY(a, b, c, d, e, f)
  denominator = b * d - a * e
  numerator = c * d - a * f
  y = numerator / denominator
  y = 0.0 if y == -0.0
  return y
end

f = Array.new(6)

while input = gets
  value = input.split(/\s* \s*/)
  for i in 0...value.size
    f[i] = value[i].to_f
  end
  puts sprintf("%.3f %.3f",
    getX(f[0], f[1], f[2], f[3], f[4], f[5]),
    getY(f[0], f[1], f[2], f[3], f[4], f[5]))
end