Sahih Bukhari | Volume 8 | Hadith Number 250

Narrated by Abu Huraira
The Prophet said, "The young should greet the old, the passer by should greet the sitting one, and the small group of persons should greet the large group of persons."