while line = gets do
  a, b, c, d, e, f = line.chomp.split.map(&:to_f)
  case
  when a * b * c * d != 0 || d * e != 0
    g = b / e
    h = a / d
    puts sprintf( "%1.3f %1.3f", ( ( c - g * f ) / ( a - g * d ) ), ( ( c - h * f ) / ( b - h * e ) ) )
  when a * b != 0
    g = e / b
    h = d / a
    puts sprintf( "%1.3f %1.3f", ( ( f - g * c ) / ( d - g * a ) ), ( ( f - h * c ) / ( e - h * b ) ) )
  when a == 0
    puts sprintf( "%1.3f %1.3f", f / d, c / b )
  when b == 0
    puts sprintf( "%1.3f %1.3f", c / a, f / e )
  end
end