Two men sneezed in the presence of the Prophet ﷺ. He invoked a blessing upon one of them but not upon the other.He was asked, "Messenger of Allah, two men sneezed in your presence. You invoked a blessing upon one but not upon the other."He replied, "This one praised Allah, and this one did not praise Allah."
حدثنا أبو بكر بن أبي شيبة حدثنا يزيد بن هارون عن سليمان التيمي
عطس رجلان عند النبي ﷺ فشمت أحدهما أو سمت ولم يشمت الآخر فقيل يا رسول الله عطس عندك رجلان فشمت أحدهما ولم تشمت الآخر فقال إن هذا حمد الله وإن هذا لم يحمد الله
Bukhari narrated it in the Book of Manners, chapter on saying "al-hamdu lillah" upon sneezing, hadith no. 6225, 6221, and Muslim narrated it in the Book of Asceticism, chapter on responding to the sneezer and the dislike of yawning, hadith no. 53/2991, from the hadith of Sulayman Taymi through this route.