Factors that break and don't break the fast

Inhaling steam while fasting

Q: I know that inhaling steam or smoke while fasting causes the fast to break. My question is that when cooking food while fasting, there is a great risk that steam will be inhaled. Will it be necessary to take precautions to avoid the steam by keeping a distance from the cooking food as much as possible? In the case where one inhales steam unintentionally, will one's fast break?

Mazi coming out while fasting

Q: My question is during one Ramadhaan while fasting my wife accidentally sucked my private part (wife was not fasting) out of excitement. I immediately withdrew. But after that there was a seminal discharge. I heard in such a case the fast is broken. Please tell me what is the sharia'h ruling in this case?