Sunan Abi Dawud · No. 4019Chapter 33
" لاَ يُفْضِيَنَّ رَجُلٌ إِلَى رَجُلٍ وَلاَ امْرَأَةٌ إِلَى امْرَأَةٍ إِلاَّ وَلَدًا أَوْ وَالِدًا "
The Prophet (ﷺ) said: A man should not lie with another man and a woman should not lie with another woman without covering their private parts except a child or a father. He also mentioned a third thing which I forgot.