Narrated Abu Huraira:The Prophet (ﷺ) said, "The boy is for (the owner of) the bed and the stone is for the person who commits illegal sexual intercourse
Hadith No. 6818
Sahih al Bukhari