الْحَمْدُ لِلَّهِ الَّذِي عَافَانِي مِمَّا ابْتَلَاكَ بِهِ وَفَضَّلَنِي عَلَى كَثِيرٍ مِمَّنْ خَلَقَ تَفْضِيلًا
Alhamdulillahilladhi 'afani mimmabtlaka bihi wa faddalani 'ala kathirin mimman khalaqa tafdila
Praise be to Allah who has saved me from what He has afflicted you with and favored me greatly over many of those He has created.
Say quietly when seeing someone afflicted - not to hurt their feelings
This dua protects one from that affliction while expressing gratitude to Allah for His favors.