Sunan Ibn Majah, Volume 5, Book 33, Hadith 3713 (DarusSalam)

It was narrated that Anas bin Malik said: "Two men sneezed in he presence of the Prophet and he replied (said: YarhamukAllah; may Allah have mercy on you') to one and not to the other. It was said: 'O Messenger of Allah, two men sneezed in your presence and you replied to one and not to the other?' He said: "'This one praised Allah(said Al-Hamdulillah fter sneezing) but that one did not.'"

حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا يَزِيدُ بْنُ هَارُونَ، عَنْ سُلَيْمَانَ التَّيْمِيِّ، عَنْ أَنَسِ بْنِ مَالِكٍ، قَالَ عَطَسَ رَجُلاَنِ عِنْدَ النَّبِيِّ ـ صلى الله عليه وسلم ـ فَشَمَّتَ أَحَدَهُمَا - أَوْ سَمَّتَ - وَلَمْ يُشَمِّتِ الآخَرَ فَقِيلَ يَا رَسُولَ اللَّهِ عَطَسَ عِنْدَكَ رَجُلاَنِ فَشَمَّتَّ أَحَدَهُمَا وَلَمْ تُشَمِّتِ الآخَرَ فَقَالَ ‏ "‏ إِنَّ هَذَا حَمِدَ اللَّهَ وَإِنَّ هَذَا لَمْ يَحْمَدِ اللَّهَ ‏" ‏ ‏.‏

sunnah.com