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