In one variant, "When one of you sees someone who has been given more bounty in respect of wealth or physical strength, he should then look at someone who has less than him."
Riyadh-as-Saliheen by Imam Al-Nawawi, volume 3, hadith number 467 - Sunni Hadith